19 foreach ( $pathsByType as $type => $paths ) {
20 foreach ( $paths as
$path ) {
21 if ( isset( $this->locksHeld[
$path][$type] ) ) {
22 ++$this->locksHeld[
$path][$type];
24 $this->locksHeld[
$path][$type] = 1;
29 return StatusValue::newGood();
34 $status = StatusValue::newGood();
35 foreach ( $pathsByType as $type => $paths ) {
36 foreach ( $paths as
$path ) {
37 if ( isset( $this->locksHeld[
$path][$type] ) ) {
38 if ( --$this->locksHeld[
$path][$type] <= 0 ) {
39 unset( $this->locksHeld[
$path][$type] );
40 if ( !$this->locksHeld[
$path] ) {
41 unset( $this->locksHeld[
$path] );
45 $status->warning(
'lockmanager-notlocked',
$path );
54class_alias( NullLockManager::class,
'NullLockManager' );
Generic operation result class Has warning/error list, boolean status and arbitrary value.