<?php
+
+use Wikimedia\Rdbms\DBError;
+
/**
* PostgreSQL version of DBLockManager that supports shared locks.
* All locks are non-blocking, which avoids deadlocks.
protected function doGetLocksOnServer( $lockSrv, array $paths, $type ) {
$status = StatusValue::newGood();
- if ( !count( $paths ) ) {
+ if ( $paths === [] ) {
return $status; // nothing to lock
}