Conditions | 2 |
Paths | 2 |
Total Lines | 6 |
Lines | 3 |
Ratio | 50 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
78 | public function getTokenDefinitions(): iterable |
||
79 | { |
||
80 | View Code Duplication | foreach ($this->tokens as $name => $pcre) { |
|
|
|||
81 | yield new TokenDefinition($name, $pcre, ! \in_array($name, $this->skipped, true)); |
||
82 | } |
||
83 | } |
||
84 | } |
||
85 |
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.