diff --git a/tests/Integration/Database/DatabaseEloquentModelCustomCastingTest.php b/tests/Integration/Database/DatabaseEloquentModelCustomCastingTest.php index f72b2de2263a..f77f25e23ab4 100644 --- a/tests/Integration/Database/DatabaseEloquentModelCustomCastingTest.php +++ b/tests/Integration/Database/DatabaseEloquentModelCustomCastingTest.php @@ -96,7 +96,7 @@ public function testBasicCustomCasting() public function testGetOriginalWithCastValueObjects() { $model = new TestEloquentModelWithCustomCast([ - 'address' => new Address('110 Kingsbrook St.', 'My Childhood House') + 'address' => new Address('110 Kingsbrook St.', 'My Childhood House'), ]); $model->syncOriginal(); @@ -106,9 +106,8 @@ public function testGetOriginalWithCastValueObjects() $this->assertEquals('110 Kingsbrook St.', $model->getOriginal('address')->lineOne); $this->assertEquals('117 Spencer St.', $model->address->lineOne); - $model = new TestEloquentModelWithCustomCast([ - 'address' => new Address('110 Kingsbrook St.', 'My Childhood House') + 'address' => new Address('110 Kingsbrook St.', 'My Childhood House'), ]); $model->syncOriginal(); @@ -241,7 +240,7 @@ class AddressCaster implements CastsAttributes public function get($model, $key, $value, $attributes) { if (is_null($attributes['address_line_one'])) { - return null; + return; } return new Address($attributes['address_line_one'], $attributes['address_line_two']);