@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | protected function getLimitClause() : string |
52 | 52 | { |
53 | - if (! $this->query->limit) { |
|
53 | + if (!$this->query->limit) { |
|
54 | 54 | return ""; |
55 | 55 | } |
56 | 56 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | protected function getOffsetClause() : string |
66 | 66 | { |
67 | - if (! $this->query->offset) { |
|
67 | + if (!$this->query->offset) { |
|
68 | 68 | return ""; |
69 | 69 | } |
70 | 70 | |
@@ -76,12 +76,12 @@ discard block |
||
76 | 76 | $orders = collect($this->query->orders); |
77 | 77 | |
78 | 78 | return $orders |
79 | - ->reduce(function ($carry, $order) { |
|
79 | + ->reduce(function($carry, $order) { |
|
80 | 80 | if (($order["type"] ?? "") === "Raw") { |
81 | - return $carry . "_orderByRaw_" . str_slug($order["sql"]); |
|
81 | + return $carry."_orderByRaw_".str_slug($order["sql"]); |
|
82 | 82 | } |
83 | 83 | |
84 | - return $carry . "_orderBy_" . $order["column"] . "_" . $order["direction"]; |
|
84 | + return $carry."_orderBy_".$order["column"]."_".$order["direction"]; |
|
85 | 85 | }) |
86 | 86 | ?: ""; |
87 | 87 | } |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | return ""; |
93 | 93 | } |
94 | 94 | |
95 | - return "_" . implode("_", $columns); |
|
95 | + return "_".implode("_", $columns); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | protected function getTypeClause($where) : string |
99 | 99 | { |
100 | - $type =in_array($where["type"], ["In", "NotIn", "Null", "NotNull", "between"]) |
|
100 | + $type = in_array($where["type"], ["In", "NotIn", "Null", "NotNull", "between"]) |
|
101 | 101 | ? strtolower($where["type"]) |
102 | 102 | : strtolower($where["operator"]); |
103 | 103 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $values = $this->getValuesFromWhere($where); |
114 | 114 | $values = $this->getValuesFromBindings($values); |
115 | 115 | |
116 | - return "_" . $values; |
|
116 | + return "_".$values; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | protected function getValuesFromWhere(array $where) : string |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | protected function getValuesFromBindings(string $values) : string |
127 | 127 | { |
128 | - if (! $values && $this->query->bindings["where"] ?? false) { |
|
128 | + if (!$values && $this->query->bindings["where"] ?? false) { |
|
129 | 129 | $values = $this->query->bindings["where"][$this->currentBinding]; |
130 | 130 | } |
131 | 131 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | protected function getWhereClauses(array $wheres = []) : string |
136 | 136 | { |
137 | 137 | $whereClause = $this->getWheres($wheres) |
138 | - ->reduce(function ($carry, $where) { |
|
138 | + ->reduce(function($carry, $where) { |
|
139 | 139 | $value = $carry; |
140 | 140 | $value .= $this->getNestedClauses($where); |
141 | 141 | $value .= $this->getColumnClauses($where); |
@@ -151,13 +151,13 @@ discard block |
||
151 | 151 | |
152 | 152 | protected function getNestedClauses(array $where) : string |
153 | 153 | { |
154 | - if (! in_array($where["type"], ["Exists", "Nested", "NotExists"])) { |
|
154 | + if (!in_array($where["type"], ["Exists", "Nested", "NotExists"])) { |
|
155 | 155 | return ""; |
156 | 156 | } |
157 | 157 | |
158 | 158 | $this->currentBinding++; |
159 | 159 | |
160 | - return "_" . strtolower($where["type"]) . $this->getWhereClauses($where["query"]->wheres); |
|
160 | + return "_".strtolower($where["type"]).$this->getWhereClauses($where["query"]->wheres); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | protected function getColumnClauses(array $where) : string |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $clause = "_{$where["boolean"]}"; |
182 | 182 | |
183 | 183 | while (count($queryParts) > 1) { |
184 | - $clause .= "_" . array_shift($queryParts); |
|
184 | + $clause .= "_".array_shift($queryParts); |
|
185 | 185 | $clause .= $this->query->bindings["where"][$this->currentBinding]; |
186 | 186 | $this->currentBinding++; |
187 | 187 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $lastPart = array_shift($queryParts); |
190 | 190 | |
191 | 191 | if ($lastPart) { |
192 | - $clause .= "_" . $lastPart; |
|
192 | + $clause .= "_".$lastPart; |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | return str_replace(" ", "_", $clause); |
@@ -227,6 +227,6 @@ discard block |
||
227 | 227 | return ""; |
228 | 228 | } |
229 | 229 | |
230 | - return "-" . implode("-", $eagerLoads->keys()->toArray()); |
|
230 | + return "-".implode("-", $eagerLoads->keys()->toArray()); |
|
231 | 231 | } |
232 | 232 | } |