Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 11 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
70 | View Code Duplication | public function valid() |
|
71 | { |
||
72 | $this->checkLazyLoad(); |
||
73 | |||
74 | if (!isset($this->keys[$this->position])) { |
||
75 | return false; |
||
76 | } |
||
77 | |||
78 | $currentKey = $this->keys[$this->position]; |
||
79 | |||
80 | return isset($this->items[$currentKey]); |
||
81 | } |
||
83 |
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.