Safe replacement of a lot of `!count()` with `=== []`
[lhc/web/wiklou.git] / includes / libs / lockmanager / PostgreSqlLockManager.php
index d6b1ce8..fd3ffa5 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+
+use Wikimedia\Rdbms\DBError;
+
 /**
  * PostgreSQL version of DBLockManager that supports shared locks.
  * All locks are non-blocking, which avoids deadlocks.
@@ -15,7 +18,7 @@ class PostgreSqlLockManager extends DBLockManager {
 
        protected function doGetLocksOnServer( $lockSrv, array $paths, $type ) {
                $status = StatusValue::newGood();
-               if ( !count( $paths ) ) {
+               if ( $paths === [] ) {
                        return $status; // nothing to lock
                }