@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | return $this->wrap($alias).' || '.$this->wrap($column); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - return $this->wrap($alias) . ' || ' . $this->wrap($column) . '::varchar'; |
|
| 41 | + return $this->wrap($alias).' || '.$this->wrap($column).'::varchar'; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | */ |
| 122 | 122 | public function compileCycleDetectionInitialSelect(string $column): string |
| 123 | 123 | { |
| 124 | - return 'false as ' . $this->wrap($column); |
|
| 124 | + return 'false as '.$this->wrap($column); |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | /** |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | */ |
| 145 | 145 | public function compileCycleDetectionStopConstraint(string $column): string |
| 146 | 146 | { |
| 147 | - return 'not ' . $this->wrap($column); |
|
| 147 | + return 'not '.$this->wrap($column); |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | /** |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | public function compileInitialPath($column, $alias) |
| 20 | 20 | { |
| 21 | - return 'cast(' . $this->wrap($column) . ' as char(65535)) as ' . $this->wrap($alias); |
|
| 21 | + return 'cast('.$this->wrap($column).' as char(65535)) as '.$this->wrap($alias); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | /** |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | public function compileRecursivePath($column, $alias) |
| 32 | 32 | { |
| 33 | - return 'concat(' . $this->wrap($alias) . ', ?, ' . $this->wrap($column) . ')'; |
|
| 33 | + return 'concat('.$this->wrap($alias).', ?, '.$this->wrap($column).')'; |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | public function selectPathList(Builder $query, $expression, $column, $pathSeparator, $listSeparator) |
| 58 | 58 | { |
| 59 | 59 | return $query->selectRaw( |
| 60 | - 'group_concat(' . $this->wrap($column) . " separator '$listSeparator')" |
|
| 60 | + 'group_concat('.$this->wrap($column)." separator '$listSeparator')" |
|
| 61 | 61 | )->from($expression); |
| 62 | 62 | } |
| 63 | 63 | |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | */ |
| 145 | 145 | public function compileCycleDetectionInitialSelect(string $column): string |
| 146 | 146 | { |
| 147 | - return 'false as ' . $this->wrap($column); |
|
| 147 | + return 'false as '.$this->wrap($column); |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | /** |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | */ |
| 168 | 168 | public function compileCycleDetectionStopConstraint(string $column): string |
| 169 | 169 | { |
| 170 | - return 'not ' . $this->wrap($column); |
|
| 170 | + return 'not '.$this->wrap($column); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | /** |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | public function compileCycleDetectionInitialSelect(string $column): string |
| 112 | 112 | { |
| 113 | - return '0 as ' . $this->wrap($column); |
|
| 113 | + return '0 as '.$this->wrap($column); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | */ |
| 123 | 123 | public function compileCycleDetectionRecursiveSelect(string $sql, string $column): string |
| 124 | 124 | { |
| 125 | - return "case when $sql then 1 else 0 end as " . $this->wrap($column); |
|
| 125 | + return "case when $sql then 1 else 0 end as ".$this->wrap($column); |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | /** |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | */ |
| 134 | 134 | public function compileCycleDetectionStopConstraint(string $column): string |
| 135 | 135 | { |
| 136 | - return $this->wrap($column) . ' = 0'; |
|
| 136 | + return $this->wrap($column).' = 0'; |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | /** |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | public function compileCycleDetectionInitialSelect(string $column): string |
| 109 | 109 | { |
| 110 | - return 'false as ' . $this->wrap($column); |
|
| 110 | + return 'false as '.$this->wrap($column); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | */ |
| 131 | 131 | public function compileCycleDetectionStopConstraint(string $column): string |
| 132 | 132 | { |
| 133 | - return 'not ' . $this->wrap($column); |
|
| 133 | + return 'not '.$this->wrap($column); |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | /** |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | $query = $this->newModelQuery() |
| 130 | 130 | ->select("$table.*") |
| 131 | - ->selectRaw($initialDepth . ' as ' . $depth) |
|
| 131 | + ->selectRaw($initialDepth.' as '.$depth) |
|
| 132 | 132 | ->selectRaw($initialPath) |
| 133 | 133 | ->from($from); |
| 134 | 134 | |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | |
| 204 | 204 | $null = $grammar->compilePivotColumnNullValue($type); |
| 205 | 205 | |
| 206 | - $query->selectRaw("$null as " . $grammar->wrap("pivot_$column")); |
|
| 206 | + $query->selectRaw("$null as ".$grammar->wrap("pivot_$column")); |
|
| 207 | 207 | } |
| 208 | 208 | } else { |
| 209 | 209 | foreach ($columns as $column) { |
@@ -282,16 +282,16 @@ discard block |
||
| 282 | 282 | |
| 283 | 283 | $joinColumns = [ |
| 284 | 284 | 'asc' => [ |
| 285 | - $name . '.' . $this->getLocalKeyName(), |
|
| 285 | + $name.'.'.$this->getLocalKeyName(), |
|
| 286 | 286 | $this->getQualifiedChildKeyName(), |
| 287 | 287 | ], |
| 288 | 288 | 'desc' => [ |
| 289 | - $name . '.' . $this->getLocalKeyName(), |
|
| 289 | + $name.'.'.$this->getLocalKeyName(), |
|
| 290 | 290 | $this->getQualifiedParentKeyName(), |
| 291 | 291 | ], |
| 292 | 292 | ]; |
| 293 | 293 | |
| 294 | - $recursiveDepth = $depth . ' ' . ($direction === 'asc' ? '-' : '+') . ' 1'; |
|
| 294 | + $recursiveDepth = $depth.' '.($direction === 'asc' ? '-' : '+').' 1'; |
|
| 295 | 295 | |
| 296 | 296 | $recursivePath = $grammar->compileRecursivePath( |
| 297 | 297 | $this->getQualifiedLocalKeyName(), |
@@ -301,8 +301,8 @@ discard block |
||
| 301 | 301 | $recursivePathBindings = $grammar->getRecursivePathBindings($this->getPathSeparator()); |
| 302 | 302 | |
| 303 | 303 | $query = $this->newModelQuery() |
| 304 | - ->select($table . '.*') |
|
| 305 | - ->selectRaw($recursiveDepth . ' as ' . $depth) |
|
| 304 | + ->select($table.'.*') |
|
| 305 | + ->selectRaw($recursiveDepth.' as '.$depth) |
|
| 306 | 306 | ->selectRaw($recursivePath, $recursivePathBindings) |
| 307 | 307 | ->from($from); |
| 308 | 308 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | if (static::$constraints) { |
| 25 | 25 | $column = $this->andSelf ? $this->getQualifiedParentKeyName() : $this->getQualifiedRelatedPivotKeyName(); |
| 26 | 26 | |
| 27 | - $constraint = function (Builder $query) use ($column) { |
|
| 27 | + $constraint = function(Builder $query) use ($column) { |
|
| 28 | 28 | $query->where( |
| 29 | 29 | $column, |
| 30 | 30 | '=', |
@@ -101,10 +101,10 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | $first = $this->andSelf |
| 104 | - ? $query->getQuery()->from . '.' . $this->parentKey |
|
| 104 | + ? $query->getQuery()->from.'.'.$this->parentKey |
|
| 105 | 105 | : $this->getQualifiedRelatedPivotKeyName(); |
| 106 | 106 | |
| 107 | - $constraint = function (Builder $query) use ($first) { |
|
| 107 | + $constraint = function(Builder $query) use ($first) { |
|
| 108 | 108 | $query->whereColumn( |
| 109 | 109 | $first, |
| 110 | 110 | '=', |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | $table = $this->getRelationCountHash(); |
| 134 | 134 | |
| 135 | - $from = $query->getModel()->getTable() . ' as ' . $table; |
|
| 135 | + $from = $query->getModel()->getTable().' as '.$table; |
|
| 136 | 136 | |
| 137 | 137 | $query->getModel()->setTable($table); |
| 138 | 138 | |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | ? "$table.$this->parentKey" |
| 141 | 141 | : "$this->table.$this->relatedPivotKey"; |
| 142 | 142 | |
| 143 | - $constraint = function (Builder $query) use ($first) { |
|
| 143 | + $constraint = function(Builder $query) use ($first) { |
|
| 144 | 144 | $query->whereColumn( |
| 145 | 145 | $first, |
| 146 | 146 | '=', |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | $keys = $this->getKeys($models, $this->parentKey); |
| 59 | 59 | |
| 60 | - $constraint = function (Builder $query) use ($models, $whereIn, $column, $keys) { |
|
| 60 | + $constraint = function(Builder $query) use ($models, $whereIn, $column, $keys) { |
|
| 61 | 61 | $query->$whereIn($column, $keys); |
| 62 | 62 | }; |
| 63 | 63 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | protected function buildDictionary(Collection $results) |
| 82 | 82 | { |
| 83 | - return $results->mapToDictionary(function (Model $result) { |
|
| 83 | + return $results->mapToDictionary(function(Model $result) { |
|
| 84 | 84 | return [$result->getFirstPathSegment() => $result]; |
| 85 | 85 | })->all(); |
| 86 | 86 | } |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | if (static::$constraints) { |
| 25 | 25 | $column = $this->andSelf ? $this->getQualifiedParentKeyName() : $this->getQualifiedForeignPivotKeyName(); |
| 26 | 26 | |
| 27 | - $constraint = function (Builder $query) use ($column) { |
|
| 27 | + $constraint = function(Builder $query) use ($column) { |
|
| 28 | 28 | $query->where( |
| 29 | 29 | $column, |
| 30 | 30 | '=', |
@@ -101,10 +101,10 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | $first = $this->andSelf |
| 104 | - ? $query->getQuery()->from . '.' . $this->parentKey |
|
| 104 | + ? $query->getQuery()->from.'.'.$this->parentKey |
|
| 105 | 105 | : $this->getQualifiedForeignPivotKeyName(); |
| 106 | 106 | |
| 107 | - $constraint = function (Builder $query) use ($first) { |
|
| 107 | + $constraint = function(Builder $query) use ($first) { |
|
| 108 | 108 | $query->whereColumn( |
| 109 | 109 | $first, |
| 110 | 110 | '=', |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | $table = $this->getRelationCountHash(); |
| 134 | 134 | |
| 135 | - $from = $query->getModel()->getTable() . ' as ' . $table; |
|
| 135 | + $from = $query->getModel()->getTable().' as '.$table; |
|
| 136 | 136 | |
| 137 | 137 | $query->getModel()->setTable($table); |
| 138 | 138 | |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | ? "$table.$this->parentKey" |
| 141 | 141 | : "$this->table.$this->foreignPivotKey"; |
| 142 | 142 | |
| 143 | - $constraint = function (Builder $query) use ($first) { |
|
| 143 | + $constraint = function(Builder $query) use ($first) { |
|
| 144 | 144 | $query->whereColumn( |
| 145 | 145 | $first, |
| 146 | 146 | '=', |