1 | <?php |
||
16 | class ProxySourceCollection implements \ArrayAccess, \Iterator, \Countable |
||
17 | { |
||
18 | protected $items; |
||
19 | |||
20 | /** |
||
21 | * @var DefaultSorter |
||
22 | */ |
||
23 | protected $sorter; |
||
24 | |||
25 | public function __construct(array $items = [], DefaultSorter $sorter = null) |
||
30 | |||
31 | public function offsetSet($offset, $value) |
||
39 | |||
40 | public function offsetExists($offset) |
||
44 | |||
45 | public function offsetUnset($offset) |
||
49 | |||
50 | public function offsetGet($offset) |
||
54 | |||
55 | public function rewind() |
||
59 | |||
60 | public function current() |
||
64 | |||
65 | public function key() |
||
69 | |||
70 | public function next() |
||
74 | |||
75 | public function valid() |
||
79 | |||
80 | public function count() |
||
84 | |||
85 | public function init() |
||
104 | |||
105 | public function first() |
||
111 | |||
112 | // public function sort() |
||
113 | // { |
||
114 | // uasort($this->items, [$this->sorter, 'sort']); |
||
115 | // } |
||
116 | } |
||
117 |
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.