diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 6c4c0714dd..e6cb8dbd41 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -31565,16 +31565,6 @@ parameters: count: 1 path: test/classes/Stubs/DbiDummy.php - - - message: "#^Only booleans are allowed in a negated boolean, array\\\\>\\|null given\\.$#" - count: 10 - path: test/classes/Stubs/DummyResult.php - - - - message: "#^Only booleans are allowed in a negated boolean, array\\ given\\.$#" - count: 1 - path: test/classes/Stubs/DummyResult.php - - message: "#^Foreach overwrites \\$value with its value variable\\.$#" count: 1 diff --git a/test/classes/Stubs/DummyResult.php b/test/classes/Stubs/DummyResult.php index c342f00623..ffea921274 100644 --- a/test/classes/Stubs/DummyResult.php +++ b/test/classes/Stubs/DummyResult.php @@ -69,7 +69,7 @@ class DummyResult implements ResultInterface */ public function getIterator(): Generator { - if (! $this->result) { + if ($this->result === null) { return; } @@ -86,12 +86,12 @@ class DummyResult implements ResultInterface */ public function fetchAssoc(): array { - if (! $this->result) { + if ($this->result === null) { return []; } $row = $this->result[$this->pos++] ?? []; - if (! $this->columns) { + if ($this->columns === []) { return $row; } @@ -111,7 +111,7 @@ class DummyResult implements ResultInterface */ public function fetchRow(): array { - if (! $this->result || $this->pos >= count($this->result)) { + if ($this->result === null || $this->pos >= count($this->result)) { return []; } @@ -144,7 +144,7 @@ class DummyResult implements ResultInterface */ public function fetchAllAssoc(): array { - if (! $this->result) { + if ($this->result === null) { return []; } @@ -167,7 +167,7 @@ class DummyResult implements ResultInterface */ public function fetchAllColumn(): array { - if (! $this->result) { + if ($this->result === null) { return []; } @@ -188,7 +188,7 @@ class DummyResult implements ResultInterface */ public function fetchAllKeyPair(): array { - if (! $this->result) { + if ($this->result === null) { return []; } @@ -203,7 +203,7 @@ class DummyResult implements ResultInterface */ public function numFields(): int { - if (! $this->result) { + if ($this->result === null) { return 0; } @@ -217,7 +217,7 @@ class DummyResult implements ResultInterface */ public function numRows(): int { - if (! $this->result) { + if ($this->result === null) { return 0; } @@ -233,7 +233,7 @@ class DummyResult implements ResultInterface */ public function seek(int $offset): bool { - if (! $this->result) { + if ($this->result === null) { return false; } @@ -270,7 +270,7 @@ class DummyResult implements ResultInterface */ public function getFieldNames(): array { - if (! $this->result) { + if ($this->result === null) { return []; }