Code Duplication    Length = 6-6 lines in 2 locations

includes/session/SessionManager.php 2 locations

@@ 1074-1079 (lines=6) @@
1071
	 */
1072
	public function deregisterSessionBackend( SessionBackend $backend ) {
1073
		$id = $backend->getId();
1074
		if ( !isset( $this->allSessionBackends[$id] ) || !isset( $this->allSessionIds[$id] ) ||
1075
			$this->allSessionBackends[$id] !== $backend ||
1076
			$this->allSessionIds[$id] !== $backend->getSessionId()
1077
		) {
1078
			throw new \InvalidArgumentException( 'Backend was not registered with this SessionManager' );
1079
		}
1080
1081
		unset( $this->allSessionBackends[$id] );
1082
		// Explicitly do not unset $this->allSessionIds[$id]
@@ 1093-1098 (lines=6) @@
1090
	public function changeBackendId( SessionBackend $backend ) {
1091
		$sessionId = $backend->getSessionId();
1092
		$oldId = (string)$sessionId;
1093
		if ( !isset( $this->allSessionBackends[$oldId] ) || !isset( $this->allSessionIds[$oldId] ) ||
1094
			$this->allSessionBackends[$oldId] !== $backend ||
1095
			$this->allSessionIds[$oldId] !== $sessionId
1096
		) {
1097
			throw new \InvalidArgumentException( 'Backend was not registered with this SessionManager' );
1098
		}
1099
1100
		$newId = $this->generateSessionId();
1101