diff --git a/.gitattributes b/.gitattributes
index b1d53fb..554d673 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -7,3 +7,4 @@
testo.php export-ignore
monorepo-builder.php export-ignore
infection.json5 export-ignore
+psalm.xml export-ignore
diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml
index adf59f0..b9a6420 100644
--- a/.github/workflows/psalm.yml
+++ b/.github/workflows/psalm.yml
@@ -1,11 +1,14 @@
on:
push:
branches:
- - '*.*'
+ - 2.x
pull_request: null
name: static analysis
+permissions:
+ contents: read
+
jobs:
psalm:
uses: spiral/gh-actions/.github/workflows/psalm.yml@master
diff --git a/psalm.xml b/psalm.xml
index 6e265d0..b904c20 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -9,6 +9,8 @@
findUnusedCode="false"
>
+
+
diff --git a/src/Manager.php b/src/Manager.php
index c0d32d0..88b68eb 100644
--- a/src/Manager.php
+++ b/src/Manager.php
@@ -9,7 +9,6 @@
use RoadRunner\Service\DTO\V1\PBList;
use RoadRunner\Service\DTO\V1\Response;
use RoadRunner\Service\DTO\V1\Service;
-use RoadRunner\Service\DTO\V1\Status;
use RoadRunner\Service\DTO\V1\Statuses;
use Spiral\Goridge\RPC\Codec\ProtobufCodec;
use Spiral\Goridge\RPC\Exception\ServiceException;
@@ -154,7 +153,7 @@ public function terminate(string $name): bool
* cpu_percent: float,
* memory_usage: positive-int,
* pid: positive-int,
- * error?: array{
+ * error: null|array{
* code: int,
* message: non-empty-string,
* details: array{message: string, type_url: string}[]
@@ -172,11 +171,8 @@ public function statuses(string $name): array
\assert($response instanceof Statuses);
foreach ($response->getStatus() as $status) {
- \assert($status instanceof Status);
-
$error = null;
$statusError = $status->getStatus();
- /** @psalm-suppress RedundantConditionGivenDocblockType */
if ($statusError !== null) {
$error = [
'code' => $statusError->getCode(),