Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | 1 | public function getOptions(): array |
|
36 | { |
||
37 | 1 | $arrayOfRules = []; |
|
38 | 1 | foreach ($this->rules as $rule) { |
|
39 | 1 | if ($rule instanceof RuleInterface) { |
|
40 | 1 | $arrayOfRules[] = array_merge([$rule->getName()], $rule->getOptions()); |
|
41 | } else { |
||
42 | $arrayOfRules[] = [get_class($rule)]; |
||
43 | } |
||
44 | } |
||
45 | 1 | return $arrayOfRules; |
|
46 | } |
||
48 |