1 | <?php |
||
15 | class ArrayCacheSpec extends ObjectBehavior |
||
16 | { |
||
17 | function it_is_initializable() |
||
22 | |||
23 | function it_can_store_items() |
||
29 | |||
30 | /* |
||
|
|||
31 | function it_can_store_items_for_a_limited_period_of_time() |
||
32 | { |
||
33 | $this->has('foo')->shouldReturn(false); |
||
34 | $this->set('foo', 'bar', 1); |
||
35 | |||
36 | sleep(2); |
||
37 | $this->shouldThrow(new ExpiredException('foo'))->duringGet('foo'); |
||
38 | } |
||
39 | */ |
||
40 | |||
41 | function it_throws_an_exception_when_trying_to_get_a_non_set_item() |
||
45 | |||
46 | function it_can_return_a_default_value_when_pulling_a_non_set_item() |
||
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.