Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
7 | 15 | public function convert($order) |
|
8 | { |
||
9 | 15 | $result = []; |
|
10 | 15 | foreach ($order as $item) { |
|
11 | 12 | $args = []; |
|
12 | 12 | $args[] = $this->getValueWithoutQuotes($item, 'base_expr'); |
|
13 | 12 | if ('ASC' !== strtoupper($item['direction'])) { |
|
14 | 6 | $args[] = strtoupper($item['direction']); |
|
15 | } |
||
16 | 12 | $result[] = $this->format('orderBy', $args); |
|
17 | } |
||
18 | |||
19 | 15 | return $result; |
|
20 | } |
||
21 | } |
||
22 |