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 13
13
14
14
use Doctrine \DBAL \Connection ;
15
15
use Doctrine \DBAL \DBALException ;
16
- use Doctrine \DBAL \Driver \Result ;
17
16
use Doctrine \DBAL \DriverManager ;
18
17
use Doctrine \DBAL \Exception ;
19
18
use Doctrine \DBAL \Schema \Schema ;
@@ -173,7 +172,7 @@ public function putOffExpiration(Key $key, $ttl)
173
172
$ result = $ stmt ->execute ();
174
173
175
174
// 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 )) {
177
176
throw new LockConflictedException ();
178
177
}
179
178
@@ -205,7 +204,7 @@ public function exists(Key $key)
205
204
$ stmt ->bindValue (':token ' , $ this ->getUniqueToken ($ key ));
206
205
$ result = $ stmt ->execute ();
207
206
208
- return (bool ) ($ result instanceof Result ? $ result ->fetchOne () : $ stmt ->fetchColumn ());
207
+ return (bool ) (\is_object ( $ result) ? $ result ->fetchOne () : $ stmt ->fetchColumn ());
209
208
}
210
209
211
210
/**
You can’t perform that action at this time.
0 commit comments