From 95192b6ce922564c9df4ab2b6db469882bd4356d Mon Sep 17 00:00:00 2001 From: Jess Archer Date: Wed, 13 Jul 2022 22:44:19 +1000 Subject: [PATCH] Formatting --- .../Foundation/Console/ShowModelCommand.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Illuminate/Foundation/Console/ShowModelCommand.php b/src/Illuminate/Foundation/Console/ShowModelCommand.php index fd831d2c25f8..2cd9316b4323 100644 --- a/src/Illuminate/Foundation/Console/ShowModelCommand.php +++ b/src/Illuminate/Foundation/Console/ShowModelCommand.php @@ -111,7 +111,7 @@ public function handle() * Get the column attributes for the given model. * * @param \Illuminate\Database\Eloquent\Model $model - * @return Collection + * @return \Illuminate\Support\Collection */ protected function getAttributes($model) { @@ -138,18 +138,18 @@ protected function getAttributes($model) * * @param \Illuminate\Database\Eloquent\Model $model * @param \Doctrine\DBAL\Schema\Column[] $columns - * @return Collection + * @return \Illuminate\Support\Collection */ protected function getVirtualAttributes($model, $columns) { $class = new ReflectionClass($model); return collect($class->getMethods()) - ->filter(fn (\ReflectionMethod $method) => ! $method->isStatic() + ->filter(fn (ReflectionMethod $method) => ! $method->isStatic() && ! $method->isAbstract() && $method->getDeclaringClass()->getName() === get_class($model) ) - ->mapWithKeys(function (\ReflectionMethod $method) use ($model) { + ->mapWithKeys(function (ReflectionMethod $method) use ($model) { if (preg_match('/^get(.*)Attribute$/', $method->getName(), $matches) === 1) { return [Str::snake($matches[1]) => 'Accessor']; } elseif ($model->hasAttributeMutator($method->getName())) { @@ -176,12 +176,12 @@ protected function getVirtualAttributes($model, $columns) * Get the relations from the given model. * * @param \Illuminate\Database\Eloquent\Model $model - * @return Collection + * @return \Illuminate\Support\Collection */ protected function getRelations($model) { return collect(get_class_methods($model)) - ->map(fn ($method) => new \ReflectionMethod($model, $method)) + ->map(fn ($method) => new ReflectionMethod($model, $method)) ->filter(fn (ReflectionMethod $method) => ! $method->isStatic() && ! $method->isAbstract() && $method->getDeclaringClass()->getName() === get_class($model) @@ -336,7 +336,7 @@ protected function getCastType($column, $model) * Get the model casts, including any date casts. * * @param \Illuminate\Database\Eloquent\Model $model - * @return Collection + * @return \Illuminate\Support\Collection */ protected function getCastsWithDates($model) {