@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | protected function getLimitClause() : string |
| 45 | 45 | { |
| 46 | - if (! $this->query->limit) { |
|
| 46 | + if (!$this->query->limit) { |
|
| 47 | 47 | return ''; |
| 48 | 48 | } |
| 49 | 49 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | protected function getOffsetClause() : string |
| 59 | 59 | { |
| 60 | - if (! $this->query->offset) { |
|
| 60 | + if (!$this->query->offset) { |
|
| 61 | 61 | return ''; |
| 62 | 62 | } |
| 63 | 63 | |
@@ -69,12 +69,12 @@ discard block |
||
| 69 | 69 | $orders = collect($this->query->orders); |
| 70 | 70 | |
| 71 | 71 | return $orders |
| 72 | - ->reduce(function ($carry, $order) { |
|
| 72 | + ->reduce(function($carry, $order) { |
|
| 73 | 73 | if (($order['type'] ?? '') === 'Raw') { |
| 74 | - return $carry . '_orderByRaw_' . str_slug($order['sql']); |
|
| 74 | + return $carry.'_orderByRaw_'.str_slug($order['sql']); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - return $carry . '_orderBy_' . $order['column'] . '_' . $order['direction']; |
|
| 77 | + return $carry.'_orderBy_'.$order['column'].'_'.$order['direction']; |
|
| 78 | 78 | }) |
| 79 | 79 | ?: ''; |
| 80 | 80 | } |
@@ -85,12 +85,12 @@ discard block |
||
| 85 | 85 | return ''; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - return '_' . implode('_', $columns); |
|
| 88 | + return '_'.implode('_', $columns); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | protected function getTypeClause($where) : string |
| 92 | 92 | { |
| 93 | - $type =in_array($where['type'], ['In', 'Null', 'NotNull', 'between']) |
|
| 93 | + $type = in_array($where['type'], ['In', 'Null', 'NotNull', 'between']) |
|
| 94 | 94 | ? strtolower($where['type']) |
| 95 | 95 | : strtolower($where['operator']); |
| 96 | 96 | |
@@ -107,17 +107,17 @@ discard block |
||
| 107 | 107 | ? implode('_', $where['values']) |
| 108 | 108 | : ''; |
| 109 | 109 | |
| 110 | - if (! $values && $this->query->bindings['where'] ?? false) { |
|
| 110 | + if (!$values && $this->query->bindings['where'] ?? false) { |
|
| 111 | 111 | $values = implode('_', $this->query->bindings['where']); |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | - return '_' . $values; |
|
| 114 | + return '_'.$values; |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | protected function getWhereClauses(array $wheres = []) : string |
| 118 | 118 | { |
| 119 | 119 | return $this->getWheres($wheres) |
| 120 | - ->reduce(function ($carry, $where) { |
|
| 120 | + ->reduce(function($carry, $where) { |
|
| 121 | 121 | $value = $this->getNestedClauses($where); |
| 122 | 122 | $value .= $this->getColumnClauses($where); |
| 123 | 123 | $value .= $this->getRawClauses($where); |
@@ -130,11 +130,11 @@ discard block |
||
| 130 | 130 | |
| 131 | 131 | protected function getNestedClauses(array $where) : string |
| 132 | 132 | { |
| 133 | - if (! in_array($where['type'], ['Exists', 'Nested', 'NotExists'])) { |
|
| 133 | + if (!in_array($where['type'], ['Exists', 'Nested', 'NotExists'])) { |
|
| 134 | 134 | return ''; |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | - return '_' . strtolower($where['type']) . $this->getWhereClauses($where['query']->wheres); |
|
| 137 | + return '_'.strtolower($where['type']).$this->getWhereClauses($where['query']->wheres); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | protected function getColumnClauses(array $where) : string |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | return ''; |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - return "_{$where['boolean']}_" . str_slug($where['sql']); |
|
| 155 | + return "_{$where['boolean']}_".str_slug($where['sql']); |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | protected function getOtherClauses(array $where, string $carry = null) : string |
@@ -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 | } |