Skip to content

Commit 55b5648

Browse files
added php stan ignore
1 parent 12e3774 commit 55b5648

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"phpunit/phpunit": "11.*",
3232
"laravel/pint": "1.*",
3333
"phpstan/phpstan": "1.*",
34-
"swoole/ide-helper": "^6.0"
34+
"swoole/ide-helper": "6.*"
3535
},
3636
"suggests": {
3737
"ext-mongodb": "Needed to support MongoDB database pools",

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Pools/Adapter/Swoole.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ class Swoole extends Adapter
1010
{
1111
protected Channel $pool;
1212

13+
// @phpstan-ignore-next-line
1314
protected Lock $lock;
1415
public function initialize(int $size): static
1516
{
1617

1718
$this->pool = new Channel($size);
19+
// @phpstan-ignore-next-line`
1820
$this->lock = new Lock();
1921

2022
return $this;
@@ -58,6 +60,7 @@ public function count(): int
5860
*/
5961
public function synchronized(callable $callback): mixed
6062
{
63+
// @phpstan-ignore-next-line
6164
$acquired = $this->lock->lock();
6265

6366
if (!$acquired) {
@@ -67,6 +70,7 @@ public function synchronized(callable $callback): mixed
6770
try {
6871
return $callback();
6972
} finally {
73+
// @phpstan-ignore-next-line
7074
$this->lock->unlock();
7175
}
7276
}

0 commit comments

Comments
 (0)