Code Duplication    Length = 8-9 lines in 3 locations

includes/filebackend/lockmanager/MemcLockManager.php 1 location

@@ 114-122 (lines=9) @@
111
	}
112
113
	// @todo Change this code to work in one batch
114
	protected function freeLocksOnServer( $lockSrv, array $pathsByType ) {
115
		$status = StatusValue::newGood();
116
117
		foreach ( $pathsByType as $type => $paths ) {
118
			$status->merge( $this->doFreeLocksOnServer( $lockSrv, $paths, $type ) );
119
		}
120
121
		return $status;
122
	}
123
124
	/**
125
	 * @see QuorumLockManager::getLocksOnServer()

includes/libs/lockmanager/DBLockManager.php 1 location

@@ 100-107 (lines=8) @@
97
	 * @param array $pathsByType
98
	 * @return StatusValue
99
	 */
100
	protected function getLocksOnServer( $lockSrv, array $pathsByType ) {
101
		$status = StatusValue::newGood();
102
		foreach ( $pathsByType as $type => $paths ) {
103
			$status->merge( $this->doGetLocksOnServer( $lockSrv, $paths, $type ) );
104
		}
105
106
		return $status;
107
	}
108
109
	abstract protected function doGetLocksOnServer( $lockSrv, array $paths, $type );
110

includes/libs/lockmanager/LockManager.php 1 location

@@ 242-249 (lines=8) @@
239
	 * @return StatusValue
240
	 * @since 1.22
241
	 */
242
	protected function doUnlockByType( array $pathsByType ) {
243
		$status = StatusValue::newGood();
244
		foreach ( $pathsByType as $type => $paths ) {
245
			$status->merge( $this->doUnlock( $paths, $type ) );
246
		}
247
248
		return $status;
249
	}
250
251
	/**
252
	 * Unlock resources with the given keys and lock type