@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | protected function getLimitClause() : string |
| 46 | 46 | { |
| 47 | - if (! $this->query->limit) { |
|
| 47 | + if (!$this->query->limit) { |
|
| 48 | 48 | return ''; |
| 49 | 49 | } |
| 50 | 50 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | protected function getOffsetClause() : string |
| 60 | 60 | { |
| 61 | - if (! $this->query->offset) { |
|
| 61 | + if (!$this->query->offset) { |
|
| 62 | 62 | return ''; |
| 63 | 63 | } |
| 64 | 64 | |
@@ -70,12 +70,12 @@ discard block |
||
| 70 | 70 | $orders = collect($this->query->orders); |
| 71 | 71 | |
| 72 | 72 | return $orders |
| 73 | - ->reduce(function ($carry, $order) { |
|
| 73 | + ->reduce(function($carry, $order) { |
|
| 74 | 74 | if (($order['type'] ?? '') === 'Raw') { |
| 75 | - return $carry . '_orderByRaw_' . str_slug($order['sql']); |
|
| 75 | + return $carry.'_orderByRaw_'.str_slug($order['sql']); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - return $carry . '_orderBy_' . $order['column'] . '_' . $order['direction']; |
|
| 78 | + return $carry.'_orderBy_'.$order['column'].'_'.$order['direction']; |
|
| 79 | 79 | }) |
| 80 | 80 | ?: ''; |
| 81 | 81 | } |
@@ -86,12 +86,12 @@ discard block |
||
| 86 | 86 | return ''; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - return '_' . implode('_', $columns); |
|
| 89 | + return '_'.implode('_', $columns); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | protected function getTypeClause($where) : string |
| 93 | 93 | { |
| 94 | - $type =in_array($where['type'], ['In', 'Null', 'NotNull', 'between']) |
|
| 94 | + $type = in_array($where['type'], ['In', 'Null', 'NotNull', 'between']) |
|
| 95 | 95 | ? strtolower($where['type']) |
| 96 | 96 | : strtolower($where['operator']); |
| 97 | 97 | |
@@ -101,10 +101,10 @@ discard block |
||
| 101 | 101 | protected function getValuesClause(array $where = null) : string |
| 102 | 102 | { |
| 103 | 103 | $value = is_array(array_get($where, 'values')) |
| 104 | - ? '_' . implode('_', $where['values']) |
|
| 104 | + ? '_'.implode('_', $where['values']) |
|
| 105 | 105 | : ''; |
| 106 | 106 | |
| 107 | - if (! $value) { |
|
| 107 | + if (!$value) { |
|
| 108 | 108 | $value = is_array(array_get($this->query->bindings, 'where')) |
| 109 | 109 | ? implode('_', array_get($this->query->bindings, 'where')) |
| 110 | 110 | : ''; |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | protected function getWhereClauses(array $wheres = []) : string |
| 117 | 117 | { |
| 118 | 118 | return $this->getWheres($wheres) |
| 119 | - ->reduce(function ($carry, $where) { |
|
| 119 | + ->reduce(function($carry, $where) { |
|
| 120 | 120 | $value = $this->getNestedClauses($where); |
| 121 | 121 | $value .= $this->getColumnClauses($where); |
| 122 | 122 | $value .= $this->getRawClauses($where); |
@@ -129,11 +129,11 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | protected function getNestedClauses(array $where) : string |
| 131 | 131 | { |
| 132 | - if (! in_array($where['type'], ['Exists', 'Nested', 'NotExists'])) { |
|
| 132 | + if (!in_array($where['type'], ['Exists', 'Nested', 'NotExists'])) { |
|
| 133 | 133 | return ''; |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | - return '_' . strtolower($where['type']) . $this->getWhereClauses($where['query']->wheres); |
|
| 136 | + return '_'.strtolower($where['type']).$this->getWhereClauses($where['query']->wheres); |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | protected function getColumnClauses(array $where) : string |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | return ''; |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | - return "_{$where['boolean']}_" . str_slug($where['sql']); |
|
| 154 | + return "_{$where['boolean']}_".str_slug($where['sql']); |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | protected function getOtherClauses(array $where, string $carry = null) : string |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | $value = $this->getTypeClause($where); |
| 164 | - $value .= "_" . array_get($where, 'value'); |
|
| 164 | + $value .= "_".array_get($where, 'value'); |
|
| 165 | 165 | $value .= $this->getValuesClause($where); |
| 166 | 166 | |
| 167 | 167 | return "{$carry}-{$where['column']}_{$value}"; |
@@ -186,6 +186,6 @@ discard block |
||
| 186 | 186 | return ''; |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - return '-' . implode('-', $eagerLoads->keys()->toArray()); |
|
| 189 | + return '-'.implode('-', $eagerLoads->keys()->toArray()); |
|
| 190 | 190 | } |
| 191 | 191 | } |