From 3baf47598da6cfdefda6625c713e79f0ff2c29a5 Mon Sep 17 00:00:00 2001 From: cbl Date: Wed, 19 May 2021 11:33:26 +0200 Subject: [PATCH] Apply fixes from StyleCI --- src/Illuminate/Database/Eloquent/Relations/HasOne.php | 4 ++-- src/Illuminate/Database/Eloquent/Relations/MorphOne.php | 2 +- tests/Database/DatabaseEloquentMorphOneOfManyTest.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Illuminate/Database/Eloquent/Relations/HasOne.php b/src/Illuminate/Database/Eloquent/Relations/HasOne.php index 0964b4f2d270..4cff251a869e 100755 --- a/src/Illuminate/Database/Eloquent/Relations/HasOne.php +++ b/src/Illuminate/Database/Eloquent/Relations/HasOne.php @@ -70,10 +70,10 @@ public function match(array $models, Collection $results, $relation) */ public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*']) { - if($this->isOneOfMany()) { + if ($this->isOneOfMany()) { $this->mergeJoinsTo($query); } - + return parent::getRelationExistenceQuery($query, $parentQuery, $columns); } diff --git a/src/Illuminate/Database/Eloquent/Relations/MorphOne.php b/src/Illuminate/Database/Eloquent/Relations/MorphOne.php index dae455e74884..5afacee6caf0 100755 --- a/src/Illuminate/Database/Eloquent/Relations/MorphOne.php +++ b/src/Illuminate/Database/Eloquent/Relations/MorphOne.php @@ -68,7 +68,7 @@ public function match(array $models, Collection $results, $relation) */ public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*']) { - if($this->isOneOfMany()) { + if ($this->isOneOfMany()) { $this->mergeJoinsTo($query); } diff --git a/tests/Database/DatabaseEloquentMorphOneOfManyTest.php b/tests/Database/DatabaseEloquentMorphOneOfManyTest.php index 0a43b78a74e9..8878103ae47e 100644 --- a/tests/Database/DatabaseEloquentMorphOneOfManyTest.php +++ b/tests/Database/DatabaseEloquentMorphOneOfManyTest.php @@ -133,7 +133,7 @@ public function testWithExistsWithConstraintsInJoinSubSelect() $product->states()->create([ 'state' => 'draft', - 'type' => 'foo' + 'type' => 'foo', ]); $product = MorphOneOfManyTestProduct::withExists('current_foo_state')->first(); $this->assertTrue($product->current_foo_state_exists); @@ -183,7 +183,7 @@ public function current_foo_state() { return $this->morphOne(MorphOneOfManyTestState::class, 'stateful')->ofMany( ['id' => 'max'], - function($q) { + function ($q) { $q->where('type', 'foo'); } );