Code Duplication    Length = 6-6 lines in 2 locations

includes/session/SessionManager.php 2 locations

@@ 887-892 (lines=6) @@
884
	 */
885
	public function deregisterSessionBackend( SessionBackend $backend ) {
886
		$id = $backend->getId();
887
		if ( !isset( $this->allSessionBackends[$id] ) || !isset( $this->allSessionIds[$id] ) ||
888
			$this->allSessionBackends[$id] !== $backend ||
889
			$this->allSessionIds[$id] !== $backend->getSessionId()
890
		) {
891
			throw new \InvalidArgumentException( 'Backend was not registered with this SessionManager' );
892
		}
893
894
		unset( $this->allSessionBackends[$id] );
895
		// Explicitly do not unset $this->allSessionIds[$id]
@@ 906-911 (lines=6) @@
903
	public function changeBackendId( SessionBackend $backend ) {
904
		$sessionId = $backend->getSessionId();
905
		$oldId = (string)$sessionId;
906
		if ( !isset( $this->allSessionBackends[$oldId] ) || !isset( $this->allSessionIds[$oldId] ) ||
907
			$this->allSessionBackends[$oldId] !== $backend ||
908
			$this->allSessionIds[$oldId] !== $sessionId
909
		) {
910
			throw new \InvalidArgumentException( 'Backend was not registered with this SessionManager' );
911
		}
912
913
		$newId = $this->generateSessionId();
914