1 | <?php |
||
27 | final class AnnotationDriver |
||
28 | { |
||
29 | /** |
||
30 | * @var Reader |
||
31 | */ |
||
32 | private $reader; |
||
33 | |||
34 | /** |
||
35 | * @var TokenStorageInterface |
||
36 | */ |
||
37 | private $tokenStorage; |
||
38 | |||
39 | /** |
||
40 | * @var CheckerInterface[] |
||
41 | */ |
||
42 | private $checkers = []; |
||
43 | |||
44 | /** |
||
45 | * @var TokenTypeManager |
||
46 | */ |
||
47 | private $tokenTypeManager; |
||
48 | |||
49 | /** |
||
50 | * AnnotationDriver constructor. |
||
51 | * |
||
52 | * @param Reader $reader |
||
53 | * @param TokenStorageInterface $tokenStorage |
||
54 | * @param TokenTypeManager $tokenTypeManager |
||
55 | */ |
||
56 | public function __construct(Reader $reader, TokenStorageInterface $tokenStorage, TokenTypeManager $tokenTypeManager) |
||
62 | |||
63 | /** |
||
64 | * @param CheckerInterface $checker |
||
65 | * |
||
66 | * @return AnnotationDriver |
||
67 | */ |
||
68 | public function addChecker(CheckerInterface $checker): AnnotationDriver |
||
74 | |||
75 | /** |
||
76 | * @return CheckerInterface[] |
||
77 | */ |
||
78 | public function getCheckers(): array |
||
82 | |||
83 | public function onKernelController(FilterControllerEvent $event) |
||
116 | |||
117 | /** |
||
118 | * @param FilterControllerEvent $event |
||
119 | * @param string $message |
||
120 | */ |
||
121 | private function createAuthenticationException(FilterControllerEvent &$event, $message) |
||
135 | |||
136 | /** |
||
137 | * @param FilterControllerEvent $event |
||
138 | * @param string $message |
||
139 | */ |
||
140 | private function createAccessDeniedException(FilterControllerEvent &$event, $message) |
||
152 | |||
153 | /** |
||
154 | * @param FilterControllerEvent $event |
||
155 | * @param OAuth2Exception $exception |
||
156 | */ |
||
157 | private function updateFilterControllerEvent(FilterControllerEvent &$event, OAuth2Exception $exception) |
||
169 | } |
||
170 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.