Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function parseSymbol(FormatToken $token, FormatParserInterface $parser) |
||
18 | { |
||
19 | if ($token->is('c')) { |
||
20 | // c ISO 8601 date (added in PHP 5) 2004-02-12T15:19:21+00:00 |
||
|
|||
21 | return $parser->parseFormat('Y-m-d\TH:i:sP', true); |
||
22 | } |
||
23 | |||
24 | if ($token->is('r')) { |
||
25 | // r RFC 2822 formatted date Example: Thu, 21 Dec 2000 16:01:07 +0200 |
||
26 | return $parser->parseFormat('D, d M Y H:i:s O', true); |
||
27 | } |
||
30 |
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.