From 4002b718d901ee579d426d8f628d3eeec23e5071 Mon Sep 17 00:00:00 2001 From: Jonas Staudenmeir Date: Thu, 10 May 2018 02:03:58 +0200 Subject: [PATCH] Fix style --- src/Illuminate/Database/Eloquent/Collection.php | 2 +- .../Database/EloquentCollectionLoadMissingTest.php | 12 ++++++++---- .../Database/EloquentModelLoadMissingTest.php | 6 ++++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/Illuminate/Database/Eloquent/Collection.php b/src/Illuminate/Database/Eloquent/Collection.php index e867314bd3a5..3e41729f8a18 100755 --- a/src/Illuminate/Database/Eloquent/Collection.php +++ b/src/Illuminate/Database/Eloquent/Collection.php @@ -136,7 +136,7 @@ protected function loadMissingRelation(Collection $models, array $path) // Handle *-many relationships. if ($models->first() instanceof BaseCollection) { $models = $models->collapse(); - }; + } // Load the remaining path. $this->loadMissingRelation(new static($models), $path); diff --git a/tests/Integration/Database/EloquentCollectionLoadMissingTest.php b/tests/Integration/Database/EloquentCollectionLoadMissingTest.php index 3ebfaccecf04..88ad1f61202d 100644 --- a/tests/Integration/Database/EloquentCollectionLoadMissingTest.php +++ b/tests/Integration/Database/EloquentCollectionLoadMissingTest.php @@ -67,11 +67,13 @@ class Comment extends Model protected $guarded = ['id']; - public function parent() { + public function parent() + { return $this->belongsTo(Comment::class); } - public function revisions() { + public function revisions() + { return $this->hasMany(Revision::class); } } @@ -82,11 +84,13 @@ class Post extends Model protected $guarded = ['id']; - public function comments() { + public function comments() + { return $this->hasMany(Comment::class); } - public function user() { + public function user() + { return $this->belongsTo(User::class); } } diff --git a/tests/Integration/Database/EloquentModelLoadMissingTest.php b/tests/Integration/Database/EloquentModelLoadMissingTest.php index 43c4ad10552c..73bbccc53de2 100644 --- a/tests/Integration/Database/EloquentModelLoadMissingTest.php +++ b/tests/Integration/Database/EloquentModelLoadMissingTest.php @@ -51,7 +51,8 @@ class Comment extends Model protected $guarded = ['id']; - public function parent() { + public function parent() + { return $this->belongsTo(Comment::class); } } @@ -60,7 +61,8 @@ class Post extends Model { public $timestamps = false; - public function comments() { + public function comments() + { return $this->hasMany(Comment::class); } }