@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | $query = $this->newModelQuery() |
| 117 | 117 | ->select("$table.*") |
| 118 | - ->selectRaw($initialDepth . ' as ' . $depth) |
|
| 118 | + ->selectRaw($initialDepth.' as '.$depth) |
|
| 119 | 119 | ->selectRaw($initialPath) |
| 120 | 120 | ->from($from); |
| 121 | 121 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | |
| 189 | 189 | $null = $grammar->compilePivotColumnNullValue($type); |
| 190 | 190 | |
| 191 | - $query->selectRaw("$null as " . $grammar->wrap("pivot_$column")); |
|
| 191 | + $query->selectRaw("$null as ".$grammar->wrap("pivot_$column")); |
|
| 192 | 192 | } |
| 193 | 193 | } else { |
| 194 | 194 | foreach ($columns as $column) { |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | { |
| 209 | 209 | if ($this->enableCycleDetection() && $this->includeCycleStart()) { |
| 210 | 210 | $query->selectRaw( |
| 211 | - 'false as ' . $grammar->wrap($this->getCycleDetectionColumnName()) |
|
| 211 | + 'false as '.$grammar->wrap($this->getCycleDetectionColumnName()) |
|
| 212 | 212 | ); |
| 213 | 213 | } |
| 214 | 214 | } |
@@ -265,16 +265,16 @@ discard block |
||
| 265 | 265 | |
| 266 | 266 | $joinColumns = [ |
| 267 | 267 | 'asc' => [ |
| 268 | - $name . '.' . $this->getLocalKeyName(), |
|
| 268 | + $name.'.'.$this->getLocalKeyName(), |
|
| 269 | 269 | $this->getQualifiedChildKeyName(), |
| 270 | 270 | ], |
| 271 | 271 | 'desc' => [ |
| 272 | - $name . '.' . $this->getLocalKeyName(), |
|
| 272 | + $name.'.'.$this->getLocalKeyName(), |
|
| 273 | 273 | $this->getQualifiedParentKeyName(), |
| 274 | 274 | ], |
| 275 | 275 | ]; |
| 276 | 276 | |
| 277 | - $recursiveDepth = $depth . ' ' . ($direction === 'asc' ? '-' : '+') . ' 1'; |
|
| 277 | + $recursiveDepth = $depth.' '.($direction === 'asc' ? '-' : '+').' 1'; |
|
| 278 | 278 | |
| 279 | 279 | $recursivePath = $grammar->compileRecursivePath( |
| 280 | 280 | $this->getQualifiedLocalKeyName(), |
@@ -284,8 +284,8 @@ discard block |
||
| 284 | 284 | $recursivePathBindings = $grammar->getRecursivePathBindings($this->getPathSeparator()); |
| 285 | 285 | |
| 286 | 286 | $query = $this->newModelQuery() |
| 287 | - ->select($table . '.*') |
|
| 288 | - ->selectRaw($recursiveDepth . ' as ' . $depth) |
|
| 287 | + ->select($table.'.*') |
|
| 288 | + ->selectRaw($recursiveDepth.' as '.$depth) |
|
| 289 | 289 | ->selectRaw($recursivePath, $recursivePathBindings) |
| 290 | 290 | ->from($from); |
| 291 | 291 | |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | $query->selectRaw($sql, $bindings); |
| 364 | 364 | |
| 365 | 365 | $query->whereRaw( |
| 366 | - 'not ' . $grammar->wrap($this->getCycleDetectionColumnName()) |
|
| 366 | + 'not '.$grammar->wrap($this->getCycleDetectionColumnName()) |
|
| 367 | 367 | ); |
| 368 | 368 | } else { |
| 369 | 369 | $query->whereRaw("not($sql)", $bindings); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | public function getQualifiedParentKeyName() |
| 46 | 46 | { |
| 47 | - return $this->getPivotTableName() . '.' . $this->getParentKeyName(); |
|
| 47 | + return $this->getPivotTableName().'.'.$this->getParentKeyName(); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function getQualifiedChildKeyName() |
| 66 | 66 | { |
| 67 | - return $this->getPivotTableName() . '.' . $this->getChildKeyName(); |
|
| 67 | + return $this->getPivotTableName().'.'.$this->getChildKeyName(); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | if (static::$constraints) { |
| 26 | 26 | $column = $this->andSelf ? $this->getQualifiedParentKeyName() : $this->getQualifiedRelatedPivotKeyName(); |
| 27 | 27 | |
| 28 | - $constraint = function (Builder $query) use ($column) { |
|
| 28 | + $constraint = function(Builder $query) use ($column) { |
|
| 29 | 29 | $query->where( |
| 30 | 30 | $column, |
| 31 | 31 | '=', |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | $keys = $this->getKeys($models, $this->parentKey); |
| 53 | 53 | |
| 54 | - $constraint = function (Builder $query) use ($models, $whereIn, $column, $keys) { |
|
| 54 | + $constraint = function(Builder $query) use ($models, $whereIn, $column, $keys) { |
|
| 55 | 55 | $query->$whereIn($column, $keys); |
| 56 | 56 | }; |
| 57 | 57 | |
@@ -114,10 +114,10 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | $first = $this->andSelf |
| 117 | - ? $query->getQuery()->from . '.' . $this->parentKey |
|
| 117 | + ? $query->getQuery()->from.'.'.$this->parentKey |
|
| 118 | 118 | : $this->getQualifiedRelatedPivotKeyName(); |
| 119 | 119 | |
| 120 | - $constraint = function (Builder $query) use ($first) { |
|
| 120 | + $constraint = function(Builder $query) use ($first) { |
|
| 121 | 121 | $query->whereColumn( |
| 122 | 122 | $first, |
| 123 | 123 | '=', |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $table = $this->getRelationCountHash(); |
| 147 | 147 | |
| 148 | - $from = $query->getModel()->getTable() . ' as ' . $table; |
|
| 148 | + $from = $query->getModel()->getTable().' as '.$table; |
|
| 149 | 149 | |
| 150 | 150 | $query->getModel()->setTable($table); |
| 151 | 151 | |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | ? "$table.$this->parentKey" |
| 154 | 154 | : "$this->table.$this->relatedPivotKey"; |
| 155 | 155 | |
| 156 | - $constraint = function (Builder $query) use ($first) { |
|
| 156 | + $constraint = function(Builder $query) use ($first) { |
|
| 157 | 157 | $query->whereColumn( |
| 158 | 158 | $first, |
| 159 | 159 | '=', |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | protected function buildDictionary(Collection $results) |
| 42 | 42 | { |
| 43 | - return $results->mapToDictionary(function (Model $result) { |
|
| 43 | + return $results->mapToDictionary(function(Model $result) { |
|
| 44 | 44 | return [$result->getFirstPathSegment() => $result]; |
| 45 | 45 | })->all(); |
| 46 | 46 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | if (static::$constraints) { |
| 26 | 26 | $column = $this->andSelf ? $this->getQualifiedParentKeyName() : $this->getQualifiedForeignPivotKeyName(); |
| 27 | 27 | |
| 28 | - $constraint = function (Builder $query) use ($column) { |
|
| 28 | + $constraint = function(Builder $query) use ($column) { |
|
| 29 | 29 | $query->where( |
| 30 | 30 | $column, |
| 31 | 31 | '=', |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | $keys = $this->getKeys($models, $this->parentKey); |
| 53 | 53 | |
| 54 | - $constraint = function (Builder $query) use ($models, $whereIn, $column, $keys) { |
|
| 54 | + $constraint = function(Builder $query) use ($models, $whereIn, $column, $keys) { |
|
| 55 | 55 | $query->$whereIn($column, $keys); |
| 56 | 56 | }; |
| 57 | 57 | |
@@ -114,10 +114,10 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | $first = $this->andSelf |
| 117 | - ? $query->getQuery()->from . '.' . $this->parentKey |
|
| 117 | + ? $query->getQuery()->from.'.'.$this->parentKey |
|
| 118 | 118 | : $this->getQualifiedForeignPivotKeyName(); |
| 119 | 119 | |
| 120 | - $constraint = function (Builder $query) use ($first) { |
|
| 120 | + $constraint = function(Builder $query) use ($first) { |
|
| 121 | 121 | $query->whereColumn( |
| 122 | 122 | $first, |
| 123 | 123 | '=', |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $table = $this->getRelationCountHash(); |
| 147 | 147 | |
| 148 | - $from = $query->getModel()->getTable() . ' as ' . $table; |
|
| 148 | + $from = $query->getModel()->getTable().' as '.$table; |
|
| 149 | 149 | |
| 150 | 150 | $query->getModel()->setTable($table); |
| 151 | 151 | |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | ? "$table.$this->parentKey" |
| 154 | 154 | : "$this->table.$this->foreignPivotKey"; |
| 155 | 155 | |
| 156 | - $constraint = function (Builder $query) use ($first) { |
|
| 156 | + $constraint = function(Builder $query) use ($first) { |
|
| 157 | 157 | $query->whereColumn( |
| 158 | 158 | $first, |
| 159 | 159 | '=', |