Code Duplication    Length = 7-7 lines in 2 locations

Auth/UsrAuthFactory.php 2 locations

@@ 71-77 (lines=7) @@
68
		$auth    = null;
69
70
		switch (true) {
71
			case (isset($post['ln'], $post['pw'])):
72
				$auth = new LoginFormStrategy(
73
					$post['ln'], $post['pw'], new User
74
				);
75
				$post['ln'] || $auth->setError($auth::ERR_NOT_VALID_LOGIN);
76
				$post['pw'] || $auth->setError($auth::ERR_NOT_VALID_PASSWORD);
77
				break;
78
			case (isset($cookies['id'], $cookies['pw'])):
79
				$auth = new CookieStrategy(
80
					$cookies['id'], $cookies['pw'], new User
@@ 78-84 (lines=7) @@
75
				$post['ln'] || $auth->setError($auth::ERR_NOT_VALID_LOGIN);
76
				$post['pw'] || $auth->setError($auth::ERR_NOT_VALID_PASSWORD);
77
				break;
78
			case (isset($cookies['id'], $cookies['pw'])):
79
				$auth = new CookieStrategy(
80
					$cookies['id'], $cookies['pw'], new User
81
				);
82
				$cookies['id'] || $auth->setError($auth::ERR_NOT_VALID_UID);
83
				$cookies['pw'] || $auth->setError($auth::ERR_NOT_VALID_HASH);
84
				break;
85
			default:
86
				$auth = new GuestStrategy(new User);
87
		}