1 | <?php namespace Comodojo\Dispatcher\Output; |
||
46 | class Processor extends DispatcherClassModel { |
||
47 | |||
48 | private $codes = array( |
||
49 | // Informational 1xx |
||
50 | 100 => 'Continue', |
||
51 | 101 => 'Switching Protocols', |
||
52 | 102 => 'Processing', |
||
53 | // Successful 2xx |
||
54 | 200 => 'OK', |
||
55 | 201 => 'Created', |
||
56 | 202 => 'Accepted', |
||
57 | 203 => 'Non-Authoritative Information', |
||
58 | 204 => 'No Content', |
||
59 | 205 => 'Reset Content', |
||
60 | 206 => 'Partial Content', |
||
61 | 207 => 'Multi-Status', // missing |
||
62 | 208 => 'Already Reported', // missing |
||
63 | 226 => 'IM Used', // missing |
||
64 | // Redirection 3xx |
||
65 | 300 => 'Multiple Choices', |
||
66 | 301 => 'Moved Permanently', |
||
67 | 302 => 'Found', |
||
68 | 303 => 'See Other', |
||
69 | 304 => 'Not Modified', |
||
70 | 305 => 'Use Proxy', |
||
71 | 307 => 'Temporary Redirect', |
||
72 | 308 => 'Permanent Redirect', |
||
73 | // Client Error 4xx |
||
74 | 400 => 'Bad Request', |
||
75 | 401 => 'Unauthorized', // missing |
||
76 | 402 => 'Payment Required', // missing |
||
77 | 403 => 'Forbidden', |
||
78 | 404 => 'Not Found', |
||
79 | 405 => 'Method Not Allowed', |
||
80 | 406 => 'Not Acceptable', // missing |
||
81 | 407 => 'Proxy Authentication Required', // missing |
||
82 | 408 => 'Request Timeout', // missing |
||
83 | 409 => 'Conflict', // missing |
||
84 | 410 => 'Gone', |
||
85 | 411 => 'Length Required', // missing |
||
86 | 412 => 'Precondition Failed', // missing |
||
87 | 413 => 'Payload Too Large', // missing |
||
88 | 414 => 'URI Too Long', // missing |
||
89 | 415 => 'Unsupported Media Type', // missing |
||
90 | 416 => 'Range Not Satisfiable', // missing |
||
91 | 417 => 'Expectation Failed', // missing |
||
92 | 421 => 'Misdirected Request', // missing |
||
93 | 422 => 'Unprocessable Entity', // missing |
||
94 | 423 => 'Locked', // missing |
||
95 | 424 => 'Failed Dependency', // missing |
||
96 | 426 => 'Upgrade Required', // missing |
||
97 | 428 => 'Precondition Required', // missing |
||
98 | 429 => 'Too Many Requests', // missing |
||
99 | 431 => 'Request Header Fields Too Large', // missing |
||
100 | 451 => 'Unavailable For Legal Reasons', // missing |
||
101 | // Server Error 5xx |
||
102 | 500 => 'Internal Server Error', |
||
103 | 501 => 'Not Implemented', |
||
104 | 502 => 'Bad Gateway', |
||
105 | 503 => 'Service Unavailable', |
||
106 | 504 => 'Gateway Timeout', |
||
107 | 505 => 'HTTP Version Not Supported', |
||
108 | 506 => 'Variant Also Negotiates (Experimental)', // missing |
||
109 | 507 => 'Insufficient Storage', // missing |
||
110 | 508 => 'Loop Detected', // missing |
||
111 | 510 => 'Not Extended', // missing |
||
112 | 511 => 'Network Authentication Required' // missing |
||
113 | ); |
||
114 | |||
115 | private $request; |
||
116 | |||
117 | private $response; |
||
118 | |||
119 | 1 | public function __construct(Configuration $configuration, LoggerInterface $logger, Request $request, Response $response) { |
|
128 | |||
129 | 1 | public function send() { |
|
146 | |||
147 | 1 | public static function parse(Configuration $configuration, LoggerInterface $logger, Request $request, Response $response) { |
|
154 | |||
155 | } |
||
156 |
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.