File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 1313
1414use Doctrine \DBAL \Connection ;
1515use Doctrine \DBAL \DBALException ;
16- use Doctrine \DBAL \Driver \Result ;
1716use Doctrine \DBAL \DriverManager ;
1817use Doctrine \DBAL \Exception ;
1918use Doctrine \DBAL \Schema \Schema ;
@@ -173,7 +172,7 @@ public function putOffExpiration(Key $key, $ttl)
173172 $ result = $ stmt ->execute ();
174173
175174 // If this method is called twice in the same second, the row wouldn't be updated. We have to call exists to know if we are the owner
176- if (!($ result instanceof Result ? $ result : $ stmt )->rowCount () && !$ this ->exists ($ key )) {
175+ if (!(\is_object ( $ result) ? $ result : $ stmt )->rowCount () && !$ this ->exists ($ key )) {
177176 throw new LockConflictedException ();
178177 }
179178
@@ -205,7 +204,7 @@ public function exists(Key $key)
205204 $ stmt ->bindValue (':token ' , $ this ->getUniqueToken ($ key ));
206205 $ result = $ stmt ->execute ();
207206
208- return (bool ) ($ result instanceof Result ? $ result ->fetchOne () : $ stmt ->fetchColumn ());
207+ return (bool ) (\is_object ( $ result) ? $ result ->fetchOne () : $ stmt ->fetchColumn ());
209208 }
210209
211210 /**
You can’t perform that action at this time.
0 commit comments