Skip to content

Commit

Permalink
✅ fix usage of method_exist for phpspec
Browse files Browse the repository at this point in the history
  • Loading branch information
Nek- committed Oct 14, 2022
1 parent 7810b3e commit f1fd937
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Gaufrette/Adapter/DoctrineDbal.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function checksum($key)
public function exists($key)
{
$method = 'fetchOne'; // dbal 3.x
if (!method_exists($this->connection, $method)) {
if (!method_exists(Connection::class, $method)) {
$method = 'fetchColumn'; // dbal 2.x
}

Expand Down Expand Up @@ -159,7 +159,7 @@ public function isDirectory($key)
private function getColumnValue($key, $column)
{
$method = 'fetchOne'; // dbal 3.x
if (!method_exists($this->connection, $method)) {
if (!method_exists(Connection::class, $method)) {
$method = 'fetchColumn'; // dbal 2.x
}

Expand All @@ -184,7 +184,7 @@ public function listKeys($prefix = '')
$prefix = trim($prefix);

$method = 'fetchAllAssociative'; // dbal 3.x
if (!method_exists($this->connection, 'fetchAllAssociative')) {
if (!method_exists(Connection::class, 'fetchAllAssociative')) {
$method = 'fetchAll'; // dbal 2.x
}

Expand Down

0 comments on commit f1fd937

Please sign in to comment.