Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | 4 | public static function format($preference, $restrictions) |
|
8 | { |
||
9 | 4 | foreach ($restrictions as $restrictionType => $query) { |
|
10 | 4 | if (!in_array($restrictionType, ['And', 'Not', 'Or'])) { |
|
11 | 4 | $restrictions[$restrictionType] = self::formatExpression($preference, $query); |
|
12 | } else { |
||
13 | 2 | $restrictions[$restrictionType] = self::format($preference, $query); |
|
14 | } |
||
15 | } |
||
16 | |||
17 | 4 | return $restrictions; |
|
18 | } |
||
48 |