@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | protected function getLimitClause() : string |
| 54 | 54 | { |
| 55 | - if (! $this->query->limit) { |
|
| 55 | + if (!$this->query->limit) { |
|
| 56 | 56 | return ""; |
| 57 | 57 | } |
| 58 | 58 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | protected function getOffsetClause() : string |
| 74 | 74 | { |
| 75 | - if (! $this->query->offset) { |
|
| 75 | + if (!$this->query->offset) { |
|
| 76 | 76 | return ""; |
| 77 | 77 | } |
| 78 | 78 | |
@@ -84,12 +84,12 @@ discard block |
||
| 84 | 84 | $orders = collect($this->query->orders); |
| 85 | 85 | |
| 86 | 86 | return $orders |
| 87 | - ->reduce(function ($carry, $order) { |
|
| 87 | + ->reduce(function($carry, $order) { |
|
| 88 | 88 | if (($order["type"] ?? "") === "Raw") { |
| 89 | - return $carry . "_orderByRaw_" . str_slug($order["sql"]); |
|
| 89 | + return $carry."_orderByRaw_".str_slug($order["sql"]); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - return $carry . "_orderBy_" . $order["column"] . "_" . $order["direction"]; |
|
| 92 | + return $carry."_orderBy_".$order["column"]."_".$order["direction"]; |
|
| 93 | 93 | }) |
| 94 | 94 | ?: ""; |
| 95 | 95 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | return ""; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - return "_" . implode("_", $columns); |
|
| 103 | + return "_".implode("_", $columns); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | protected function getTypeClause($where) : string |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $values = $this->getValuesFromWhere($where); |
| 122 | 122 | $values = $this->getValuesFromBindings($where, $values); |
| 123 | 123 | |
| 124 | - return "_" . $values; |
|
| 124 | + return "_".$values; |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | protected function getValuesFromWhere(array $where) : string |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | $subKey = str_replace($prefix, "", $subKey); |
| 134 | 134 | $subKey = str_replace($this->getModelSlug(), "", $subKey); |
| 135 | 135 | $classParts = explode("\\", get_class($this->model)); |
| 136 | - $subKey = strtolower(array_pop($classParts)) . $subKey; |
|
| 136 | + $subKey = strtolower(array_pop($classParts)).$subKey; |
|
| 137 | 137 | |
| 138 | 138 | return $subKey; |
| 139 | 139 | } |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | $this->currentBinding++; |
| 154 | 154 | |
| 155 | 155 | if ($where["type"] === "between") { |
| 156 | - $values .= "_" . $this->query->bindings["where"][$this->currentBinding]; |
|
| 156 | + $values .= "_".$this->query->bindings["where"][$this->currentBinding]; |
|
| 157 | 157 | $this->currentBinding++; |
| 158 | 158 | } |
| 159 | 159 | } |
@@ -163,8 +163,8 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | protected function getWhereClauses(array $wheres = []) : string |
| 165 | 165 | { |
| 166 | - return "" . $this->getWheres($wheres) |
|
| 167 | - ->reduce(function ($carry, $where) { |
|
| 166 | + return "".$this->getWheres($wheres) |
|
| 167 | + ->reduce(function($carry, $where) { |
|
| 168 | 168 | $value = $carry; |
| 169 | 169 | $value .= $this->getNestedClauses($where); |
| 170 | 170 | $value .= $this->getColumnClauses($where); |
@@ -178,11 +178,11 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | protected function getNestedClauses(array $where) : string |
| 180 | 180 | { |
| 181 | - if (! in_array($where["type"], ["Exists", "Nested", "NotExists"])) { |
|
| 181 | + if (!in_array($where["type"], ["Exists", "Nested", "NotExists"])) { |
|
| 182 | 182 | return ""; |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | - return "-" . strtolower($where["type"]) . $this->getWhereClauses($where["query"]->wheres); |
|
| 185 | + return "-".strtolower($where["type"]).$this->getWhereClauses($where["query"]->wheres); |
|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | protected function getColumnClauses(array $where) : string |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | |
| 197 | 197 | protected function getInClauses(array $where) : string |
| 198 | 198 | { |
| 199 | - if (! in_array($where["type"], ["In"])) { |
|
| 199 | + if (!in_array($where["type"], ["In"])) { |
|
| 200 | 200 | return ""; |
| 201 | 201 | } |
| 202 | 202 | |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | |
| 209 | 209 | protected function getInAndNotInClauses(array $where) : string |
| 210 | 210 | { |
| 211 | - if (! in_array($where["type"], ["In", "NotIn"])) { |
|
| 211 | + if (!in_array($where["type"], ["In", "NotIn"])) { |
|
| 212 | 212 | return ""; |
| 213 | 213 | } |
| 214 | 214 | |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | continue; |
| 247 | 247 | } |
| 248 | 248 | |
| 249 | - $result .= $glue . $value; |
|
| 249 | + $result .= $glue.$value; |
|
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | return $result; |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | $clause = "_{$where["boolean"]}"; |
| 263 | 263 | |
| 264 | 264 | while (count($queryParts) > 1) { |
| 265 | - $clause .= "_" . array_shift($queryParts); |
|
| 265 | + $clause .= "_".array_shift($queryParts); |
|
| 266 | 266 | $clause .= $this->query->bindings["where"][$this->currentBinding]; |
| 267 | 267 | $this->currentBinding++; |
| 268 | 268 | } |
@@ -270,10 +270,10 @@ discard block |
||
| 270 | 270 | $lastPart = array_shift($queryParts); |
| 271 | 271 | |
| 272 | 272 | if ($lastPart) { |
| 273 | - $clause .= "_" . $lastPart; |
|
| 273 | + $clause .= "_".$lastPart; |
|
| 274 | 274 | } |
| 275 | 275 | |
| 276 | - return "-" . str_replace(" ", "_", $clause); |
|
| 276 | + return "-".str_replace(" ", "_", $clause); |
|
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | protected function getOtherClauses(array $where) : string |
@@ -307,6 +307,6 @@ discard block |
||
| 307 | 307 | return ""; |
| 308 | 308 | } |
| 309 | 309 | |
| 310 | - return "-" . implode("-", $eagerLoads->keys()->toArray()); |
|
| 310 | + return "-".implode("-", $eagerLoads->keys()->toArray()); |
|
| 311 | 311 | } |
| 312 | 312 | } |