From 56ef8b461399e339f02a1a7e0006ac07394d6d32 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 24 Apr 2020 14:56:37 +0000 Subject: [PATCH] Apply fixes from StyleCI [ci skip] [skip ci] --- framework/core/src/Extend/Model.php | 4 +++- framework/core/tests/integration/extenders/ModelTest.php | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/core/src/Extend/Model.php b/framework/core/src/Extend/Model.php index 30541cd6a..aae9e8762 100644 --- a/framework/core/src/Extend/Model.php +++ b/framework/core/src/Extend/Model.php @@ -35,7 +35,9 @@ class Model implements ExtenderInterface */ public function dateAttribute(string $attribute) { - Arr::set(AbstractModel::$dateAttributes, $this->modelClass, + Arr::set( + AbstractModel::$dateAttributes, + $this->modelClass, array_merge( Arr::get(AbstractModel::$dateAttributes, $this->modelClass, []), [$attribute] diff --git a/framework/core/tests/integration/extenders/ModelTest.php b/framework/core/tests/integration/extenders/ModelTest.php index 88e2989ae..f649825b8 100644 --- a/framework/core/tests/integration/extenders/ModelTest.php +++ b/framework/core/tests/integration/extenders/ModelTest.php @@ -204,6 +204,7 @@ class ModelTest extends TestCase (new Extend\Model(Group::class)) ->default('counter', function () { static $counter = 0; + return ++$counter; }) );