Skip to content

Commit

Permalink
Fix cs/phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
mnapoli committed Aug 14, 2024
1 parent 66167a1 commit 52e7015
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/FpmRuntime/FpmHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,10 @@ public function stopFpm(float $timeout): void
@posix_kill($pid, 15);
do {
usleep(1000);
// @phpstan-ignore-next-line
} while ($this->isFpmRunning() && microtime(true) < $timeoutMicro);

// @phpstan-ignore-next-line
if ($this->isFpmRunning()) {
// SIGKILL
@posix_kill($pid, 9);
Expand Down
4 changes: 2 additions & 2 deletions tests/FpmRuntime/FpmHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1255,8 +1255,8 @@ public function test worker logs are still written in case of a timeou
$this->fail('No exception was thrown');
} catch (Timeout $e) {
$this->markTestSkipped('We can no longer test this since proc_open skips output buffering, we cannot capture the logs');
$logs = ob_get_contents();
self::assertStringContainsString('This is a log message', $logs);
// $logs = ob_get_contents();
// self::assertStringContainsString('This is a log message', $logs);
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/FpmRuntime/fixtures/large-logs.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php declare(strict_types=1);

$stderr = fopen('php://stderr', 'wb');
$bytes = 512*512;
$bytes = 512 * 512;
fwrite($stderr, str_repeat('x', $bytes));

echo 'Hello, world!';

0 comments on commit 52e7015

Please sign in to comment.