| 1 | <?php |
||
| 9 | class HttpReaderSpec extends ObjectBehavior |
||
| 10 | { |
||
| 11 | function let() |
||
| 15 | |||
| 16 | function it_is_initializable() |
||
| 20 | |||
| 21 | function it_retrieves_http_response_codes() |
||
| 25 | |||
| 26 | function it_provides_access_to_its_url() |
||
| 30 | /* |
||
|
|
|||
| 31 | function it_retrieves_the_url_contents() |
||
| 32 | { |
||
| 33 | $this->getContents()->shouldReturnAnInstanceOf('\DOMDocument'); |
||
| 34 | } |
||
| 35 | |||
| 36 | function it_sets_a_logger(Logger $logger) |
||
| 37 | { |
||
| 38 | $this->setLogger($logger); |
||
| 39 | |||
| 40 | $this->getLogger()->shouldReturn($logger); |
||
| 41 | } |
||
| 42 | |||
| 43 | function it_updates_a_log(Logger $logger) |
||
| 44 | { |
||
| 45 | $logger->info("Getting response code")->shouldBeCalled(); |
||
| 46 | |||
| 47 | $this->getResponseCode(); |
||
| 48 | } |
||
| 49 | */ |
||
| 50 | } |
||
| 51 |
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.