From 7ad31cc54f980d0d8f072e7d18caa26cb078e030 Mon Sep 17 00:00:00 2001 From: laravel-ide-helper Date: Fri, 8 Mar 2024 10:06:31 +0000 Subject: [PATCH] composer fix-style --- src/Console/ModelsCommand.php | 7 ++++--- .../GenerateMixinCollection/Models/WithCollection.php | 2 ++ .../Console/ModelsCommand/GenerateMixinCollection/Test.php | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 6c78a63..9e29a5e 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -208,7 +208,7 @@ class ModelsCommand extends Command return [ ['filename', 'F', InputOption::VALUE_OPTIONAL, 'The path to the helper file'], ['dir', 'D', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, - 'The model dir, supports glob patterns', [],], + 'The model dir, supports glob patterns', [], ], ['write', 'W', InputOption::VALUE_NONE, 'Write to Model file'], ['write-mixin', 'M', InputOption::VALUE_NONE, "Write models to {$this->filename} and adds @mixin to each model, avoiding IDE duplicate declaration warnings", @@ -1254,7 +1254,8 @@ class ModelsCommand extends Command * @param array $namespaceAliases * @return string|null */ - private function extractTypeAlias(string $typeAlias, array $namespaceAliases): string|null { + private function extractTypeAlias(string $typeAlias, array $namespaceAliases): string|null + { $matches = []; preg_match('/(\w+)(<.*>)/', $typeAlias, $matches); $matchCount = count($matches); @@ -1267,7 +1268,7 @@ class ModelsCommand extends Command return null; } - return $namespaceAliases[$matches[1]].($matches[2] ?? ''); + return $namespaceAliases[$matches[1]] . ($matches[2] ?? ''); } protected function getReturnTypeFromReflection(\ReflectionMethod $reflection): ?string diff --git a/tests/Console/ModelsCommand/GenerateMixinCollection/Models/WithCollection.php b/tests/Console/ModelsCommand/GenerateMixinCollection/Models/WithCollection.php index 997ae3b..11bfb98 100644 --- a/tests/Console/ModelsCommand/GenerateMixinCollection/Models/WithCollection.php +++ b/tests/Console/ModelsCommand/GenerateMixinCollection/Models/WithCollection.php @@ -1,5 +1,7 @@