Skip to content

Commit d061a30

Browse files
committed
Fixed wrong complaint of phpstan
1 parent 1c5fa33 commit d061a30

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Builder/QueryStatement.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,14 @@ public function execute(array $params = []) {
8181
* @return array<mixed, mixed>
8282
*/
8383
public function fetchAll($fetchStyle = PDO::FETCH_ASSOC, $fetchArgument = null, array $ctorArgs = []): array {
84-
$result = $this->exceptionHandler(function() use ($fetchStyle, $fetchArgument, $ctorArgs) {
84+
$result = $x = $this->exceptionHandler(function() use ($fetchStyle, $fetchArgument, $ctorArgs) {
8585
if($fetchArgument !== null) {
8686
return $this->statement->fetchAll($fetchStyle, $fetchArgument, ...$ctorArgs);
8787
}
8888
return $this->statement->fetchAll($fetchStyle);
8989
});
90-
if(is_bool($result)) {
90+
/** @var array<mixed, mixed>|false $x */
91+
if($x === false) {
9192
return [];
9293
}
9394
return $result;

0 commit comments

Comments
 (0)