Skip to content

Commit cba010d

Browse files
committed
cs fixes
1 parent fb125b8 commit cba010d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/bref/src/Timeout/Timeout.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,20 @@ private static function init(): void
5050
return;
5151
}
5252

53-
if (! function_exists('pcntl_async_signals')) {
53+
if (!function_exists('pcntl_async_signals')) {
5454
trigger_error('Could not enable timeout exceptions because pcntl extension is not enabled.');
55+
5556
return;
5657
}
5758

5859
pcntl_async_signals(true);
5960
// Setup a handler for SIGALRM that throws an exception
6061
// This will interrupt any running PHP code, including `sleep()` or code stuck waiting for I/O.
6162
pcntl_signal(SIGALRM, function (): void {
62-
if (Timeout::$stackTrace !== null) {
63+
if (null !== Timeout::$stackTrace) {
6364
// we have already thrown an exception, do a harder exit.
6465
error_log('Lambda timed out');
65-
error_log((new LambdaTimeoutException)->getTraceAsString());
66+
error_log((new LambdaTimeoutException())->getTraceAsString());
6667
error_log('Original stack trace');
6768
error_log(Timeout::$stackTrace);
6869

src/bref/tests/Timeout/TimeoutTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
namespace Runtime\Bref\Tests;
44

5+
use PHPUnit\Framework\TestCase;
56
use Runtime\Bref\Timeout\LambdaTimeoutException;
67
use Runtime\Bref\Timeout\Timeout;
7-
use PHPUnit\Framework\TestCase;
88

99
class TimeoutTest extends TestCase
1010
{
1111
public static function setUpBeforeClass(): void
1212
{
13-
if (! function_exists('pcntl_async_signals')) {
13+
if (!function_exists('pcntl_async_signals')) {
1414
self::markTestSkipped('PCNTL extension is not enabled.');
1515
}
1616
}

0 commit comments

Comments
 (0)