1 | <?php |
||
22 | class App |
||
23 | { |
||
24 | |||
25 | /* |
||
|
|||
26 | private $config = [ |
||
27 | 'base_dir' => null, |
||
28 | 'app_dir' => '/var/lib/www/app', |
||
29 | 'app_data_dir' => '/tmp', |
||
30 | 'base_url' => null, |
||
31 | 'app_namespace' => 'SelamiApp', |
||
32 | 'app_name' => 'www', |
||
33 | 'default_return_type' => 'html', |
||
34 | 'template_engine' => 'Twig', |
||
35 | 'bypass_error_handlers' => true, |
||
36 | 'aliases' => [] |
||
37 | ]; |
||
38 | */ |
||
39 | /** |
||
40 | * @var ContainerInterface |
||
41 | */ |
||
42 | private $container; |
||
43 | /** |
||
44 | * @var ZendConfig |
||
45 | */ |
||
46 | private $config; |
||
47 | /** |
||
48 | * @var array |
||
49 | */ |
||
50 | private $route; |
||
51 | |||
52 | /** |
||
53 | * @var array |
||
54 | */ |
||
55 | private $response; |
||
56 | |||
57 | public function __construct( |
||
67 | |||
68 | public static function selamiApplicationFactory(ContainerInterface $container) : App |
||
76 | |||
77 | public function __invoke( |
||
90 | |||
91 | private function run() : void |
||
95 | |||
96 | |||
97 | |||
98 | private function runDispatcher(array $route) : void |
||
115 | |||
116 | private function runRoute(string $controllerClass, string $returnType = 'html', ?array $args) : void |
||
127 | |||
128 | public function getResponse() : array |
||
133 | |||
134 | public function sendResponse() : void |
||
139 | } |
||
140 |
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.