Total Complexity | 2 |
Total Lines | 22 |
Duplicated Lines | 36.36 % |
Changes | 0 |
Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
1 | <?php |
||
7 | class DynamicParameter extends AbstractEnumParameter |
||
8 | { |
||
9 | const ID = 'dynamic'; |
||
10 | const FRIENDLY_ID = self::ID; |
||
11 | |||
12 | const VALUE_TRUE = 'true'; |
||
13 | const VALUE_FALSE = 'false'; |
||
14 | const VALUE_STRICT = 'strict'; |
||
15 | |||
16 | public function getId(): string |
||
19 | } |
||
20 | |||
21 | View Code Duplication | public function getAllowedValues() |
|
32 |
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.