From 83e15c27eed68f05e70d1da8d52ed698df046f73 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Mon, 6 Jan 2025 19:52:03 +0100 Subject: [PATCH] OCI8: Remove PHP 7 compat code --- phpstan.neon.dist | 10 ---------- src/Driver/OCI8/Result.php | 8 +------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 27b53826df..954e9728e8 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -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\.$~' diff --git a/src/Driver/OCI8/Result.php b/src/Driver/OCI8/Result.php index fd19e414c0..bafd883b0e 100644 --- a/src/Driver/OCI8/Result.php +++ b/src/Driver/OCI8/Result.php @@ -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