Skip to content

Commit

Permalink
Changes after PHP CS Fixer update
Browse files Browse the repository at this point in the history
  • Loading branch information
otsch committed Oct 28, 2023
1 parent 23b4fb1 commit c0a33bc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Loader/Http/HttpLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ protected function loadViaHeadlessBrowser(RequestInterface $request): RespondedR

$page->getSession()->once(
"method:Network.responseReceived",
function ($params) use (& $statusCode, & $responseHeaders) {
function ($params) use (&$statusCode, &$responseHeaders) {
$statusCode = $params['response']['status'];

$responseHeaders = $this->sanitizeResponseHeaders($params['response']['headers']);
Expand Down
2 changes: 1 addition & 1 deletion tests/CrawlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ public function store(Result $result): void
->input(1)
->addStep(helper_getNumberIncrementingStep())
->addStep(helper_getNumberIncrementingStep())
->outputHook(function (Output $output, int $stepIndex, StepInterface $step) use (& $outputs) {
->outputHook(function (Output $output, int $stepIndex, StepInterface $step) use (&$outputs) {
$outputs[$stepIndex][] = $output->get();
});

Expand Down
14 changes: 7 additions & 7 deletions tests/Loader/Http/HttpLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ function ($responseStatusCode) {

$beforeLoadWasCalled = false;

$httpLoader->beforeLoad(function () use (& $beforeLoadWasCalled) {
$httpLoader->beforeLoad(function () use (&$beforeLoadWasCalled) {
$beforeLoadWasCalled = true;
});

$afterLoadWasCalled = false;

$httpLoader->beforeLoad(function () use (& $afterLoadWasCalled) {
$httpLoader->beforeLoad(function () use (&$afterLoadWasCalled) {
$afterLoadWasCalled = true;
});

Expand All @@ -108,7 +108,7 @@ function ($responseStatusCode) {

$onSuccessWasCalled = false;

$httpLoader->onSuccess(function () use (& $onSuccessWasCalled) {
$httpLoader->onSuccess(function () use (&$onSuccessWasCalled) {
$onSuccessWasCalled = true;
});

Expand Down Expand Up @@ -136,7 +136,7 @@ function ($responseStatusCode) {

$onErrorWasCalled = false;

$httpLoader->onError(function () use (& $onErrorWasCalled) {
$httpLoader->onError(function () use (&$onErrorWasCalled) {
$onErrorWasCalled = true;
});

Expand Down Expand Up @@ -172,7 +172,7 @@ function ($responseStatusCode) {

$onCacheHitWasCalled = false;

$httpLoader->onCacheHit(function () use (& $onCacheHitWasCalled) {
$httpLoader->onCacheHit(function () use (&$onCacheHitWasCalled) {
$onCacheHitWasCalled = true;
});

Expand All @@ -190,7 +190,7 @@ function ($responseStatusCode) {

$onErrorWasCalled = false;

$httpLoader->onError(function () use (& $onErrorWasCalled) {
$httpLoader->onError(function () use (&$onErrorWasCalled) {
$onErrorWasCalled = true;
});

Expand Down Expand Up @@ -475,7 +475,7 @@ public function trackRequestEndFor(UriInterface $url): void

$onErrorWasCalled = false;

$httpLoader->onError(function () use (& $onErrorWasCalled) {
$httpLoader->onError(function () use (&$onErrorWasCalled) {
$onErrorWasCalled = true;
});

Expand Down
6 changes: 3 additions & 3 deletions tests/Loader/LoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ public function loadOrFail(mixed $subject): mixed
}
};
$callback1Called = false;
$loader->{$hookName}(function () use (& $callback1Called) {
$loader->{$hookName}(function () use (&$callback1Called) {
$callback1Called = true;
});
$callback2Called = false;
$loader->{$hookName}(function () use (& $callback2Called) {
$loader->{$hookName}(function () use (&$callback2Called) {
$callback2Called = true;
});
$callback3Called = false;
$loader->{$hookName}(function () use (& $callback3Called) {
$loader->{$hookName}(function () use (&$callback3Called) {
$callback3Called = true;
});

Expand Down

0 comments on commit c0a33bc

Please sign in to comment.