Skip to content

Commit

Permalink
OCI8: Remove PHP 7 compat code
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Jan 6, 2025
1 parent 804103e commit 6e1738f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
10 changes: 0 additions & 10 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ parameters:
paths:
- src/Schema/Column.php

# TODO: remove this once the support for PHP 7 is dropped
-
message: '~^Strict comparison using !== between int and false will always evaluate to true\.$~'
paths:
- src/Driver/OCI8/Result.php
-
message: '~^Unreachable statement - code above always terminates\.$~'
paths:
- src/Driver/OCI8/Result.php

# https://github.com/phpstan/phpstan/issues/4679
-
message: '~^Cannot call method writeTemporary\(\) on OCILob\|null\.$~'
Expand Down
8 changes: 1 addition & 7 deletions src/Driver/OCI8/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,7 @@ public function rowCount(): int

public function columnCount(): int

Check failure on line 89 in src/Driver/OCI8/Result.php

View workflow job for this annotation

GitHub Actions / Static Analysis with Psalm (8.4)

InvalidFalsableReturnType

src/Driver/OCI8/Result.php:89:36: InvalidFalsableReturnType: The declared return type 'int' for Doctrine\DBAL\Driver\OCI8\Result::columnCount does not allow false, but 'false|int' contains false (see https://psalm.dev/143)
{
$count = oci_num_fields($this->statement);

if ($count !== false) {
return $count;
}

return 0;
return oci_num_fields($this->statement);

Check failure on line 91 in src/Driver/OCI8/Result.php

View workflow job for this annotation

GitHub Actions / Static Analysis with Psalm (8.4)

FalsableReturnStatement

src/Driver/OCI8/Result.php:91:16: FalsableReturnStatement: The declared return type 'int' for Doctrine\DBAL\Driver\OCI8\Result::columnCount does not allow false, but the function returns 'false|int' (see https://psalm.dev/137)
}

public function getColumnName(int $index): string
Expand Down

0 comments on commit 6e1738f

Please sign in to comment.