Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0f7d404

Browse files
committed
Fix a couple more Psalm 6 issues
1 parent 81fc462 commit 0f7d404

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

examples/channel.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
<?php declare(strict_types=1);
22

33
use Amp\Future;
4-
use Amp\Sync\Channel;
54
use function Amp\async;
65
use function Amp\delay;
76
use function Amp\Sync\createChannelPair;
87

98
require __DIR__ . '/../vendor/autoload.php';
109

11-
/**
12-
* @var Channel<int, int> $left
13-
* @var Channel<int, int> $right
14-
*/
1510
[$left, $right] = createChannelPair();
1611

1712
$future1 = async(function () use ($left): void {

src/RateLimitingSemaphore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(
3030
private readonly float $lockPeriod,
3131
) {
3232
if ($lockPeriod <= 0) {
33-
throw new \ValueError('The lock period must be greater than 0, got ' . $lockPeriod);
33+
throw new \ValueError('The lock period must be greater than 0, got ' . (string) $lockPeriod);
3434
}
3535

3636
$this->timers = new \SplQueue();

0 commit comments

Comments
 (0)