From bef76459989e51659a2cd1eb3b6f72ea77baf614 Mon Sep 17 00:00:00 2001 From: Erik Gaal Date: Mon, 15 Aug 2022 13:39:44 +0200 Subject: [PATCH] Fixes from StyleCI --- src/Properties/ModelPropertyExtension.php | 2 +- tests/Application/app/Casts/Favorites.php | 2 +- tests/Application/app/User.php | 4 ++-- tests/Features/Properties/ModelPropertyExtension.php | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Properties/ModelPropertyExtension.php b/src/Properties/ModelPropertyExtension.php index bf3ee78653..fd90fd7a77 100644 --- a/src/Properties/ModelPropertyExtension.php +++ b/src/Properties/ModelPropertyExtension.php @@ -289,7 +289,7 @@ private function castPropertiesType(Model $modelInstance): void } if ($this->tables[$modelInstance->getTable()]->columns[$name]->nullable) { - $realType = $realType instanceof Type ? TypeCombinator::addNull($realType) : $realType . '|null'; + $realType = $realType instanceof Type ? TypeCombinator::addNull($realType) : $realType.'|null'; } $this->tables[$modelInstance->getTable()]->columns[$name]->readableType = $realType; diff --git a/tests/Application/app/Casts/Favorites.php b/tests/Application/app/Casts/Favorites.php index 499a231eb0..c6a7498b3e 100644 --- a/tests/Application/app/Casts/Favorites.php +++ b/tests/Application/app/Casts/Favorites.php @@ -20,7 +20,7 @@ public function get($model, $key, $value, $attributes) /** * Prepare the given value for storage. * - * @param Favorites $value + * @param Favorites $value */ public function set($model, $key, $value, $attributes) { diff --git a/tests/Application/app/User.php b/tests/Application/app/User.php index 0acb562a1e..beda764d1b 100644 --- a/tests/Application/app/User.php +++ b/tests/Application/app/User.php @@ -2,6 +2,7 @@ namespace App; +use App\Casts\Favorites; use function get_class; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Casts\AsArrayObject; @@ -18,7 +19,6 @@ use Illuminate\Notifications\Notifiable; use Illuminate\Support\Str; use Tests\Application\HasManySyncable; -use App\Casts\Favorites; /** * @property string $propertyDefinedOnlyInAnnotation @@ -39,7 +39,7 @@ class User extends Authenticatable * @var array */ protected $fillable = [ - 'name', 'email', 'password' + 'name', 'email', 'password', ]; /** @var array */ diff --git a/tests/Features/Properties/ModelPropertyExtension.php b/tests/Features/Properties/ModelPropertyExtension.php index 8eea61f18a..f4ac1041f4 100644 --- a/tests/Features/Properties/ModelPropertyExtension.php +++ b/tests/Features/Properties/ModelPropertyExtension.php @@ -17,7 +17,6 @@ use Carbon\Carbon as BaseCarbon; use Illuminate\Support\Carbon; use Illuminate\Support\Collection; -use function PHPStan\dumpType; use function PHPStan\Testing\assertType; class ModelPropertyExtension