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 16, 2025
1 parent 3d03548 commit 83e15c2
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
{
$count = oci_num_fields($this->statement);

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

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

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

0 comments on commit 83e15c2

Please sign in to comment.