Skip to content

Commit 28c0a75

Browse files
added php nenon
1 parent 55b5648 commit 28c0a75

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"scripts": {
2121
"lint": "./vendor/bin/pint --preset psr12 --test",
2222
"format": "./vendor/bin/pint --preset psr12",
23-
"check": "./vendor/bin/phpstan analyse --level max src tests",
23+
"check": "./vendor/bin/phpstan analyse -c phpstan.neon",
2424
"test": "./vendor/bin/phpunit --configuration phpunit.xml --debug"
2525
},
2626
"require": {

phpstan.neon

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
parameters:
2+
level: 8
3+
4+
paths:
5+
- src
6+
- tests
7+
8+
scanDirectories:
9+
- vendor/swoole/ide-helper
10+

src/Pools/Adapter/Swoole.php

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

13-
// @phpstan-ignore-next-line
1413
protected Lock $lock;
1514
public function initialize(int $size): static
1615
{
1716

1817
$this->pool = new Channel($size);
19-
// @phpstan-ignore-next-line`
2018
$this->lock = new Lock();
2119

2220
return $this;
@@ -60,7 +58,6 @@ public function count(): int
6058
*/
6159
public function synchronized(callable $callback): mixed
6260
{
63-
// @phpstan-ignore-next-line
6461
$acquired = $this->lock->lock();
6562

6663
if (!$acquired) {
@@ -70,7 +67,6 @@ public function synchronized(callable $callback): mixed
7067
try {
7168
return $callback();
7269
} finally {
73-
// @phpstan-ignore-next-line
7470
$this->lock->unlock();
7571
}
7672
}

0 commit comments

Comments
 (0)