Completed
Push — develop ( 8dee05 )
by Dmytro
20:08
created
core/vendor/illuminate/database/Eloquent/Relations/HasManyThrough.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -337,7 +337,7 @@
 block discarded – undo
337 337
     /**
338 338
      * Get the results of the relationship.
339 339
      *
340
-     * @return mixed
340
+     * @return Collection
341 341
      */
342 342
     public function getResults()
343 343
     {
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@
 block discarded – undo
2 2
 
3 3
 namespace Illuminate\Database\Eloquent\Relations;
4 4
 
5
-use Illuminate\Database\Eloquent\Model;
6 5
 use Illuminate\Database\Eloquent\Builder;
7 6
 use Illuminate\Database\Eloquent\Collection;
8
-use Illuminate\Database\Eloquent\SoftDeletes;
7
+use Illuminate\Database\Eloquent\Model;
9 8
 use Illuminate\Database\Eloquent\ModelNotFoundException;
9
+use Illuminate\Database\Eloquent\SoftDeletes;
10 10
 
11 11
 class HasManyThrough extends Relation
12 12
 {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
      */
268 268
     public function firstOrFail($columns = ['*'])
269 269
     {
270
-        if (! is_null($model = $this->first($columns))) {
270
+        if (!is_null($model = $this->first($columns))) {
271 271
             return $model;
272 272
         }
273 273
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
             if (count($result) === count(array_unique($id))) {
328 328
                 return $result;
329 329
             }
330
-        } elseif (! is_null($result)) {
330
+        } elseif (!is_null($result)) {
331 331
             return $result;
332 332
         }
333 333
 
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
      */
445 445
     public function each(callable $callback, $count = 1000)
446 446
     {
447
-        return $this->chunk($count, function ($results) use ($callback) {
447
+        return $this->chunk($count, function($results) use ($callback) {
448 448
             foreach ($results as $key => $value) {
449 449
                 if ($callback($value, $key) === false) {
450 450
                     return false;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -444,7 +444,7 @@
 block discarded – undo
444 444
      */
445 445
     public function each(callable $callback, $count = 1000)
446 446
     {
447
-        return $this->chunk($count, function ($results) use ($callback) {
447
+        return $this->chunk($count, function ($results) use ($callback){
448 448
             foreach ($results as $key => $value) {
449 449
                 if ($callback($value, $key) === false) {
450 450
                     return false;
Please login to merge, or discard this patch.
core/vendor/illuminate/database/Eloquent/Relations/HasOne.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Illuminate\Database\Eloquent\Relations;
4 4
 
5
-use Illuminate\Database\Eloquent\Model;
6 5
 use Illuminate\Database\Eloquent\Collection;
6
+use Illuminate\Database\Eloquent\Model;
7 7
 use Illuminate\Database\Eloquent\Relations\Concerns\SupportsDefaultModels;
8 8
 
9 9
 class HasOne extends HasOneOrMany
Please login to merge, or discard this patch.
core/vendor/illuminate/database/Eloquent/Relations/HasOneOrMany.php 3 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Illuminate\Database\Eloquent\Relations;
4 4
 
5
-use Illuminate\Database\Eloquent\Model;
6 5
 use Illuminate\Database\Eloquent\Builder;
7 6
 use Illuminate\Database\Eloquent\Collection;
7
+use Illuminate\Database\Eloquent\Model;
8 8
 
9 9
 abstract class HasOneOrMany extends Relation
10 10
 {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function make(array $attributes = [])
56 56
     {
57
-        return tap($this->related->newInstance($attributes), function ($instance) {
57
+        return tap($this->related->newInstance($attributes), function($instance){
58 58
             $this->setForeignAttributesForCreate($instance);
59 59
         });
60 60
     }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     {
165 165
         $foreign = $this->getForeignKeyName();
166 166
 
167
-        return $results->mapToDictionary(function ($result) use ($foreign) {
167
+        return $results->mapToDictionary(function($result) use ($foreign) {
168 168
             return [$result->{$foreign} => $result];
169 169
         })->all();
170 170
     }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
      */
231 231
     public function updateOrCreate(array $attributes, array $values = [])
232 232
     {
233
-        return tap($this->firstOrNew($attributes), function ($instance) use ($values) {
233
+        return tap($this->firstOrNew($attributes), function($instance) use ($values) {
234 234
             $instance->fill($values);
235 235
 
236 236
             $instance->save();
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      */
274 274
     public function create(array $attributes = [])
275 275
     {
276
-        return tap($this->related->newInstance($attributes), function ($instance) {
276
+        return tap($this->related->newInstance($attributes), function($instance){
277 277
             $this->setForeignAttributesForCreate($instance);
278 278
 
279 279
             $instance->save();
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
      */
317 317
     public function update(array $attributes)
318 318
     {
319
-        if ($this->related->usesTimestamps() && ! is_null($this->relatedUpdatedAt())) {
319
+        if ($this->related->usesTimestamps() && !is_null($this->relatedUpdatedAt())) {
320 320
             $attributes[$this->relatedUpdatedAt()] = $this->related->freshTimestampString();
321 321
         }
322 322
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function make(array $attributes = [])
56 56
     {
57
-        return tap($this->related->newInstance($attributes), function ($instance) {
57
+        return tap($this->related->newInstance($attributes), function ($instance){
58 58
             $this->setForeignAttributesForCreate($instance);
59 59
         });
60 60
     }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     {
165 165
         $foreign = $this->getForeignKeyName();
166 166
 
167
-        return $results->mapToDictionary(function ($result) use ($foreign) {
167
+        return $results->mapToDictionary(function ($result) use ($foreign){
168 168
             return [$result->{$foreign} => $result];
169 169
         })->all();
170 170
     }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
      */
231 231
     public function updateOrCreate(array $attributes, array $values = [])
232 232
     {
233
-        return tap($this->firstOrNew($attributes), function ($instance) use ($values) {
233
+        return tap($this->firstOrNew($attributes), function ($instance) use ($values){
234 234
             $instance->fill($values);
235 235
 
236 236
             $instance->save();
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      */
274 274
     public function create(array $attributes = [])
275 275
     {
276
-        return tap($this->related->newInstance($attributes), function ($instance) {
276
+        return tap($this->related->newInstance($attributes), function ($instance){
277 277
             $this->setForeignAttributesForCreate($instance);
278 278
 
279 279
             $instance->save();
Please login to merge, or discard this patch.
core/vendor/illuminate/database/Eloquent/Relations/MorphOne.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Illuminate\Database\Eloquent\Relations;
4 4
 
5
-use Illuminate\Database\Eloquent\Model;
6 5
 use Illuminate\Database\Eloquent\Collection;
6
+use Illuminate\Database\Eloquent\Model;
7 7
 use Illuminate\Database\Eloquent\Relations\Concerns\SupportsDefaultModels;
8 8
 
9 9
 class MorphOne extends MorphOneOrMany
Please login to merge, or discard this patch.
core/vendor/illuminate/database/Eloquent/Relations/MorphOneOrMany.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Illuminate\Database\Eloquent\Relations;
4 4
 
5
-use Illuminate\Database\Eloquent\Model;
6 5
 use Illuminate\Database\Eloquent\Builder;
6
+use Illuminate\Database\Eloquent\Model;
7 7
 
8 8
 abstract class MorphOneOrMany extends HasOneOrMany
9 9
 {
Please login to merge, or discard this patch.
core/vendor/illuminate/database/Eloquent/Relations/MorphPivot.php 4 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Illuminate\Database\Eloquent\Relations;
4 4
 
5
-use Illuminate\Support\Str;
6 5
 use Illuminate\Database\Eloquent\Builder;
6
+use Illuminate\Support\Str;
7 7
 
8 8
 class MorphPivot extends Pivot
9 9
 {
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -140,8 +140,8 @@
 block discarded – undo
140 140
 
141 141
             $query->orWhere(function ($query) use ($segments) {
142 142
                 return $query->where($segments[0], $segments[1])
143
-                             ->where($segments[2], $segments[3])
144
-                             ->where($segments[4], $segments[5]);
143
+                                ->where($segments[2], $segments[3])
144
+                                ->where($segments[4], $segments[5]);
145 145
             });
146 146
         }
147 147
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             return $this->newQueryForCollectionRestoration($ids);
110 110
         }
111 111
 
112
-        if (! Str::contains($ids, ':')) {
112
+        if (!Str::contains($ids, ':')) {
113 113
             return parent::newQueryForRestoration($ids);
114 114
         }
115 115
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     protected function newQueryForCollectionRestoration(array $ids)
131 131
     {
132
-        if (! Str::contains($ids[0], ':')) {
132
+        if (!Str::contains($ids[0], ':')) {
133 133
             return parent::newQueryForRestoration($ids);
134 134
         }
135 135
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         foreach ($ids as $id) {
139 139
             $segments = explode(':', $id);
140 140
 
141
-            $query->orWhere(function ($query) use ($segments) {
141
+            $query->orWhere(function($query) use ($segments) {
142 142
                 return $query->where($segments[0], $segments[1])
143 143
                              ->where($segments[2], $segments[3])
144 144
                              ->where($segments[4], $segments[5]);
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
         foreach ($ids as $id) {
139 139
             $segments = explode(':', $id);
140 140
 
141
-            $query->orWhere(function ($query) use ($segments) {
141
+            $query->orWhere(function ($query) use ($segments){
142 142
                 return $query->where($segments[0], $segments[1])
143 143
                              ->where($segments[2], $segments[3])
144 144
                              ->where($segments[4], $segments[5]);
Please login to merge, or discard this patch.
core/vendor/illuminate/database/Eloquent/Relations/MorphTo.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
      *
100 100
      * Called via eager load method of Eloquent query builder.
101 101
      *
102
-     * @return mixed
102
+     * @return Collection
103 103
      */
104 104
     public function getEager()
105 105
     {
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@
 block discarded – undo
3 3
 namespace Illuminate\Database\Eloquent\Relations;
4 4
 
5 5
 use BadMethodCallException;
6
-use Illuminate\Database\Eloquent\Model;
7 6
 use Illuminate\Database\Eloquent\Builder;
8 7
 use Illuminate\Database\Eloquent\Collection;
8
+use Illuminate\Database\Eloquent\Model;
9 9
 
10 10
 /**
11 11
  * @mixin \Illuminate\Database\Eloquent\Builder
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      */
140 140
     protected function gatherKeysByType($type)
141 141
     {
142
-        return collect($this->dictionary[$type])->map(function ($models) {
142
+        return collect($this->dictionary[$type])->map(function($models){
143 143
             return head($models)->{$this->foreignKey};
144 144
         })->values()->unique()->all();
145 145
     }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     protected function matchToMorphParents($type, Collection $results)
181 181
     {
182 182
         foreach ($results as $result) {
183
-            $ownerKey = ! is_null($this->ownerKey) ? $result->{$this->ownerKey} : $result->getKey();
183
+            $ownerKey = !is_null($this->ownerKey) ? $result->{$this->ownerKey} : $result->getKey();
184 184
 
185 185
             if (isset($this->dictionary[$type][$ownerKey])) {
186 186
                 foreach ($this->dictionary[$type][$ownerKey] as $model) {
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
      */
231 231
     public function touch()
232 232
     {
233
-        if (! is_null($this->ownerKey)) {
233
+        if (!is_null($this->ownerKey)) {
234 234
             parent::touch();
235 235
         }
236 236
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
      */
140 140
     protected function gatherKeysByType($type)
141 141
     {
142
-        return collect($this->dictionary[$type])->map(function ($models) {
142
+        return collect($this->dictionary[$type])->map(function ($models){
143 143
             return head($models)->{$this->foreignKey};
144 144
         })->values()->unique()->all();
145 145
     }
Please login to merge, or discard this patch.
core/vendor/illuminate/database/Eloquent/Relations/MorphToMany.php 4 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Illuminate\Database\Eloquent\Relations;
4 4
 
5
-use Illuminate\Support\Arr;
6
-use Illuminate\Database\Eloquent\Model;
7 5
 use Illuminate\Database\Eloquent\Builder;
6
+use Illuminate\Database\Eloquent\Model;
7
+use Illuminate\Support\Arr;
8 8
 
9 9
 class MorphToMany extends BelongsToMany
10 10
 {
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -140,8 +140,8 @@
 block discarded – undo
140 140
                         : MorphPivot::fromAttributes($this->parent, $attributes, $this->table, $exists);
141 141
 
142 142
         $pivot->setPivotKeys($this->foreignPivotKey, $this->relatedPivotKey)
143
-              ->setMorphType($this->morphType)
144
-              ->setMorphClass($this->morphClass);
143
+                ->setMorphType($this->morphType)
144
+                ->setMorphClass($this->morphClass);
145 145
 
146 146
         return $pivot;
147 147
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
     {
158 158
         $defaults = [$this->foreignPivotKey, $this->relatedPivotKey, $this->morphType];
159 159
 
160
-        return collect(array_merge($defaults, $this->pivotColumns))->map(function ($column) {
160
+        return collect(array_merge($defaults, $this->pivotColumns))->map(function($column){
161 161
             return $this->table.'.'.$column.' as pivot_'.$column;
162 162
         })->unique()->all();
163 163
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
     {
158 158
         $defaults = [$this->foreignPivotKey, $this->relatedPivotKey, $this->morphType];
159 159
 
160
-        return collect(array_merge($defaults, $this->pivotColumns))->map(function ($column) {
160
+        return collect(array_merge($defaults, $this->pivotColumns))->map(function ($column){
161 161
             return $this->table.'.'.$column.' as pivot_'.$column;
162 162
         })->unique()->all();
163 163
     }
Please login to merge, or discard this patch.
core/vendor/illuminate/database/Eloquent/Relations/Pivot.php 4 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Illuminate\Database\Eloquent\Relations;
4 4
 
5
-use Illuminate\Support\Str;
6
-use Illuminate\Database\Eloquent\Model;
7 5
 use Illuminate\Database\Eloquent\Builder;
6
+use Illuminate\Database\Eloquent\Model;
7
+use Illuminate\Support\Str;
8 8
 
9 9
 class Pivot extends Model
10 10
 {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -293,7 +293,7 @@
 block discarded – undo
293 293
 
294 294
             $query->orWhere(function ($query) use ($segments) {
295 295
                 return $query->where($segments[0], $segments[1])
296
-                             ->where($segments[2], $segments[3]);
296
+                                ->where($segments[2], $segments[3]);
297 297
             });
298 298
         }
299 299
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     public function getTable()
146 146
     {
147
-        if (! isset($this->table)) {
147
+        if (!isset($this->table)) {
148 148
             $this->setTable(str_replace(
149 149
                 '\\', '', Str::snake(Str::singular(class_basename($this)))
150 150
             ));
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
             return $this->newQueryForCollectionRestoration($ids);
264 264
         }
265 265
 
266
-        if (! Str::contains($ids, ':')) {
266
+        if (!Str::contains($ids, ':')) {
267 267
             return parent::newQueryForRestoration($ids);
268 268
         }
269 269
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
      */
283 283
     protected function newQueryForCollectionRestoration(array $ids)
284 284
     {
285
-        if (! Str::contains($ids[0], ':')) {
285
+        if (!Str::contains($ids[0], ':')) {
286 286
             return parent::newQueryForRestoration($ids);
287 287
         }
288 288
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
         foreach ($ids as $id) {
292 292
             $segments = explode(':', $id);
293 293
 
294
-            $query->orWhere(function ($query) use ($segments) {
294
+            $query->orWhere(function($query) use ($segments) {
295 295
                 return $query->where($segments[0], $segments[1])
296 296
                              ->where($segments[2], $segments[3]);
297 297
             });
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -291,7 +291,7 @@
 block discarded – undo
291 291
         foreach ($ids as $id) {
292 292
             $segments = explode(':', $id);
293 293
 
294
-            $query->orWhere(function ($query) use ($segments) {
294
+            $query->orWhere(function ($query) use ($segments){
295 295
                 return $query->where($segments[0], $segments[1])
296 296
                              ->where($segments[2], $segments[3]);
297 297
             });
Please login to merge, or discard this patch.