Skip to content

Commit 82efa20

Browse files
committed
Add strict types declaration and minor formatting adjustments in tests
1 parent f0f4f2f commit 82efa20

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/functions.php

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
function getLoop(): object
1313
{
1414
static $loop = null;
15+
1516
if ($loop === null) {
1617
$loop = Loop::get();
1718
}

tests/AsyncAwaitTest.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
it('supports chaining then and catch syntax', function () {
46
$func = async(fn () => 'Success');
57

@@ -25,7 +27,7 @@ function (mixed $value) use (&$result) {
2527

2628
expect($result)->toBe('Success');
2729
} catch (\Throwable $th) {
28-
$this->fail('Await threw an unexpected exception: '.$th->getMessage());
30+
$this->fail('Await threw an unexpected exception: ' . $th->getMessage());
2931
}
3032
});
3133

0 commit comments

Comments
 (0)