@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | protected function getLimitClause() : string |
| 40 | 40 | { |
| 41 | - if (! $this->query->limit) { |
|
| 41 | + if (!$this->query->limit) { |
|
| 42 | 42 | return ''; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | protected function getOffsetClause() : string |
| 54 | 54 | { |
| 55 | - if (! $this->query->offset) { |
|
| 55 | + if (!$this->query->offset) { |
|
| 56 | 56 | return ''; |
| 57 | 57 | } |
| 58 | 58 | |
@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | { |
| 64 | 64 | $orders = collect($this->query->orders); |
| 65 | 65 | |
| 66 | - return $orders->reduce(function($carry, $order){ |
|
| 67 | - return $carry . '_orderBy_' . $order['column'] . '_' . $order['direction']; |
|
| 66 | + return $orders->reduce(function($carry, $order) { |
|
| 67 | + return $carry.'_orderBy_'.$order['column'].'_'.$order['direction']; |
|
| 68 | 68 | }) |
| 69 | 69 | ?: ''; |
| 70 | 70 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | return ''; |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - return '_' . implode('_', $columns); |
|
| 78 | + return '_'.implode('_', $columns); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | protected function getTypeClause($where) : string |
@@ -88,14 +88,14 @@ discard block |
||
| 88 | 88 | protected function getValuesClause(array $where = null) : string |
| 89 | 89 | { |
| 90 | 90 | return is_array(array_get($where, 'values')) |
| 91 | - ? '_' . implode('_', $where['values']) |
|
| 91 | + ? '_'.implode('_', $where['values']) |
|
| 92 | 92 | : ''; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | protected function getWhereClauses(array $wheres = []) : string |
| 96 | 96 | { |
| 97 | 97 | return $this->getWheres($wheres) |
| 98 | - ->reduce(function ($carry, $where) { |
|
| 98 | + ->reduce(function($carry, $where) { |
|
| 99 | 99 | $value = $this->getNestedClauses($where); |
| 100 | 100 | $value .= $this->getColumnClauses($where); |
| 101 | 101 | $value .= $this->getRawClauses($where); |
@@ -108,11 +108,11 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | protected function getNestedClauses(array $where) : string |
| 110 | 110 | { |
| 111 | - if (! in_array($where['type'], ['Exists', 'Nested', 'NotExists'])) { |
|
| 111 | + if (!in_array($where['type'], ['Exists', 'Nested', 'NotExists'])) { |
|
| 112 | 112 | return ''; |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - return '_' . strtolower($where['type']) . $this->getWhereClauses($where['query']->wheres); |
|
| 115 | + return '_'.strtolower($where['type']).$this->getWhereClauses($where['query']->wheres); |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | protected function getColumnClauses(array $where) : string |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | return ''; |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | - return "_{$where['boolean']}_" . str_slug($where['sql']); |
|
| 133 | + return "_{$where['boolean']}_".str_slug($where['sql']); |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | protected function getOtherClauses(array $where, string $carry = null) : string |
@@ -165,6 +165,6 @@ discard block |
||
| 165 | 165 | return ''; |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | - return '-' . implode('-', $eagerLoads->keys()->toArray()); |
|
| 168 | + return '-'.implode('-', $eagerLoads->keys()->toArray()); |
|
| 169 | 169 | } |
| 170 | 170 | } |