public static function factory(
LockManager $manager, array $paths, $type, StatusValue $status, $timeout = 0
) {
- $pathsByType = is_integer( $type ) ? [ $type => $paths ] : $paths;
+ $pathsByType = is_int( $type ) ? [ $type => $paths ] : $paths;
$lockStatus = $manager->lockByType( $pathsByType, $timeout );
$status->merge( $lockStatus );
if ( $lockStatus->isOK() ) {
* This is useful for early release of locks before function scope is destroyed.
* This is the same as setting the lock object to null.
*
- * @param ScopedLock $lock
+ * @param ScopedLock &$lock
* @since 1.21
*/
public static function release( ScopedLock &$lock = null ) {