1 | <?php |
||
20 | class Authentication extends AbstractMiddleware |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * @var bool |
||
25 | */ |
||
26 | private $guestsAllowed; |
||
27 | |||
28 | /** |
||
29 | * @var DatabaseUserProvider |
||
30 | */ |
||
31 | private $userProvider; |
||
32 | |||
33 | /** |
||
34 | * @var bool |
||
35 | */ |
||
36 | private $allowedPrivateIps; |
||
|
|||
37 | |||
38 | /** |
||
39 | * @Inject({ |
||
40 | * "%application.guests_allowed%", |
||
41 | * "@DatabaseUserProvider", |
||
42 | * }) |
||
43 | * @param boolean $guestsAllowed |
||
44 | * @param DatabaseUserProvider $userProvider |
||
45 | */ |
||
46 | 7 | public function __construct($guestsAllowed, DatabaseUserProvider $userProvider) |
|
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | 1 | public function processResponse(Request $request, Response $response) |
|
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | 5 | public function processRequest(Request $request, Route $route) |
|
87 | |||
88 | /** |
||
89 | * @param Route $route |
||
90 | * @param UserVO $user |
||
91 | * @throws MethodNotAllowedException |
||
92 | */ |
||
93 | 5 | protected function checkForRole(Route $route, $user) |
|
102 | |||
103 | /** |
||
104 | * @param int $userId |
||
105 | * @return AnonymusUserVO|UserVO |
||
106 | */ |
||
107 | 5 | private function loadUser($userId) |
|
117 | } |
||
118 |
This check marks private properties in classes that are never used. Those properties can be removed.