Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 8 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace Comodojo\Dispatcher\Output\HttpStatus; |
||
29 | public function consolidate() { |
||
30 | |||
31 | //PLEASE NOTE: according to HTTP/1.1, 202 header SHOULD HAVE status description in body... just in case |
||
32 | header($_SERVER["SERVER_PROTOCOL"].' 202 Accepted'); |
||
33 | header('Status: 202 Accepted'); |
||
34 | header('Content-Length: '.$this->response()->content()->length()); |
||
35 | |||
36 | } |
||
37 | |||
39 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.