Code Duplication    Length = 6-6 lines in 2 locations

includes/session/SessionManager.php 2 locations

@@ 1034-1039 (lines=6) @@
1031
	 */
1032
	public function deregisterSessionBackend( SessionBackend $backend ) {
1033
		$id = $backend->getId();
1034
		if ( !isset( $this->allSessionBackends[$id] ) || !isset( $this->allSessionIds[$id] ) ||
1035
			$this->allSessionBackends[$id] !== $backend ||
1036
			$this->allSessionIds[$id] !== $backend->getSessionId()
1037
		) {
1038
			throw new \InvalidArgumentException( 'Backend was not registered with this SessionManager' );
1039
		}
1040
1041
		unset( $this->allSessionBackends[$id] );
1042
		// Explicitly do not unset $this->allSessionIds[$id]
@@ 1053-1058 (lines=6) @@
1050
	public function changeBackendId( SessionBackend $backend ) {
1051
		$sessionId = $backend->getSessionId();
1052
		$oldId = (string)$sessionId;
1053
		if ( !isset( $this->allSessionBackends[$oldId] ) || !isset( $this->allSessionIds[$oldId] ) ||
1054
			$this->allSessionBackends[$oldId] !== $backend ||
1055
			$this->allSessionIds[$oldId] !== $sessionId
1056
		) {
1057
			throw new \InvalidArgumentException( 'Backend was not registered with this SessionManager' );
1058
		}
1059
1060
		$newId = $this->generateSessionId();
1061