Skip to content

Commit

Permalink
bot: fix cs [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
nikophil authored and kbond committed Jan 24, 2024
1 parent 4ad6074 commit 66353b0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions src/Browser/KernelBrowser.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*/
class KernelBrowser extends Browser
{
private ?Browser\HttpOptions $defaultHttpOptions = null;
private ?HttpOptions $defaultHttpOptions = null;

/**
* @internal
Expand Down Expand Up @@ -103,7 +103,7 @@ final public function catchExceptions(): self
* to determine the expected exception class. When
* exception is caught, callable is invoked with
* the caught exception
* @param Browser\string|null $expectedMessage Assert the caught exception message "contains"
* @param string|null $expectedMessage Assert the caught exception message "contains"
* this string
*/
public function expectException($expectedException, ?string $expectedMessage = null): self
Expand Down Expand Up @@ -280,7 +280,7 @@ final public function assertRedirectedTo(string $expected, int $max = \PHP_INT_M
*/
final public function setDefaultHttpOptions($options): self
{
$this->defaultHttpOptions = Browser\HttpOptions::create($options);
$this->defaultHttpOptions = HttpOptions::create($options);

return $this;
}
Expand All @@ -296,7 +296,7 @@ final public function request(string $method, string $url, $options = []): self
$options = $this->defaultHttpOptions->merge($options);
}

$options = Browser\HttpOptions::create($options);
$options = HttpOptions::create($options);

$this->session()->request($method, $options->addQueryToUrl($url), $options);

Expand Down Expand Up @@ -497,7 +497,7 @@ final public function assertJsonMatches(string $expression, $expected): self
return $this;
}

final public function json(): Browser\Json
final public function json(): Json
{
return $this->assertJson()->session()->json();
}
Expand All @@ -506,7 +506,7 @@ protected function useParameters(): array
{
return [
...parent::useParameters(),
Parameter::typed(Browser\Json::class, Parameter::factory(fn() => $this->json())),
Parameter::typed(Json::class, Parameter::factory(fn() => $this->json())),
Parameter::typed(DataCollectorInterface::class, Parameter::factory(function(string $class) {
foreach ($this->profile()->getCollectors() as $collector) {
if ($class === $collector::class) {
Expand Down
2 changes: 1 addition & 1 deletion src/Browser/PantherBrowser.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ final public function saveConsoleLog(string $filename): self

final public function dumpConsoleLog(): self
{
Browser\Session::varDump($this->client()->manage()->getLog('browser'));
Session::varDump($this->client()->manage()->getLog('browser'));

return $this;
}
Expand Down
20 changes: 10 additions & 10 deletions src/Browser/Test/BootstrappedExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ class BootstrappedExtension
{
public function bootstrap(Configuration $configuration, Facade $facade, ParameterCollection $parameters): void
{
$extension = new Browser\Test\LegacyExtension();
$extension = new LegacyExtension();

$facade->registerSubscriber(new class($extension) implements TestRunnerStartedSubscriber {
public function __construct(
private Browser\Test\LegacyExtension $extension,
private LegacyExtension $extension,
) {
}

Expand All @@ -49,7 +49,7 @@ public function notify(TestRunnerStartedEvent $event): void

$facade->registerSubscriber(new class($extension) implements TestRunnerFinishedSubscriber {
public function __construct(
private Browser\Test\LegacyExtension $extension,
private LegacyExtension $extension,
) {
}

Expand All @@ -61,7 +61,7 @@ public function notify(TestRunnerFinishedEvent $event): void

$facade->registerSubscriber(new class($extension) implements TestStartedSubscriber {
public function __construct(
private Browser\Test\LegacyExtension $extension,
private LegacyExtension $extension,
) {
}

Expand All @@ -73,7 +73,7 @@ public function notify(TestStartedEvent $event): void

$facade->registerSubscriber(new class($extension) implements TestFinishedSubscriber {
public function __construct(
private Browser\Test\LegacyExtension $extension,
private LegacyExtension $extension,
) {
}

Expand All @@ -88,14 +88,14 @@ public function notify(TestFinishedEvent $event): void

$facade->registerSubscriber(new class($extension) implements ErroredSubscriber {
public function __construct(
private Browser\Test\LegacyExtension $extension,
private LegacyExtension $extension,
) {
}

public function notify(Errored $event): void
{
$this->extension->executeAfterTestError(
Browser\Test\BootstrappedExtension::testName($event->test()),
BootstrappedExtension::testName($event->test()),
$event->throwable()->message(),
(float) $event->telemetryInfo()->time()->seconds(),
);
Expand All @@ -104,14 +104,14 @@ public function notify(Errored $event): void

$facade->registerSubscriber(new class($extension) implements FailedSubscriber {
public function __construct(
private Browser\Test\LegacyExtension $extension,
private LegacyExtension $extension,
) {
}

public function notify(Failed $event): void
{
$this->extension->executeAfterTestFailure(
Browser\Test\BootstrappedExtension::testName($event->test()),
BootstrappedExtension::testName($event->test()),
$event->throwable()->message(),
(float) $event->telemetryInfo()->time()->seconds())
;
Expand All @@ -136,6 +136,6 @@ public static function testName(Test $test): string
*/
public static function registerBrowser(Browser $browser): void
{
Browser\Test\LegacyExtension::registerBrowser($browser);
LegacyExtension::registerBrowser($browser);
}
}

0 comments on commit 66353b0

Please sign in to comment.