composer fix-style

This commit is contained in:
laravel-ide-helper
2024-03-08 10:06:31 +00:00
committed by github-actions[bot]
parent 98252fe740
commit 7ad31cc54f
3 changed files with 8 additions and 3 deletions
+4 -3
View File
@@ -208,7 +208,7 @@ class ModelsCommand extends Command
return [ return [
['filename', 'F', InputOption::VALUE_OPTIONAL, 'The path to the helper file'], ['filename', 'F', InputOption::VALUE_OPTIONAL, 'The path to the helper file'],
['dir', 'D', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, ['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', 'W', InputOption::VALUE_NONE, 'Write to Model file'],
['write-mixin', 'M', InputOption::VALUE_NONE, ['write-mixin', 'M', InputOption::VALUE_NONE,
"Write models to {$this->filename} and adds @mixin to each model, avoiding IDE duplicate declaration warnings", "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 * @param array $namespaceAliases
* @return string|null * @return string|null
*/ */
private function extractTypeAlias(string $typeAlias, array $namespaceAliases): string|null { private function extractTypeAlias(string $typeAlias, array $namespaceAliases): string|null
{
$matches = []; $matches = [];
preg_match('/(\w+)(<.*>)/', $typeAlias, $matches); preg_match('/(\w+)(<.*>)/', $typeAlias, $matches);
$matchCount = count($matches); $matchCount = count($matches);
@@ -1267,7 +1268,7 @@ class ModelsCommand extends Command
return null; return null;
} }
return $namespaceAliases[$matches[1]].($matches[2] ?? ''); return $namespaceAliases[$matches[1]] . ($matches[2] ?? '');
} }
protected function getReturnTypeFromReflection(\ReflectionMethod $reflection): ?string protected function getReturnTypeFromReflection(\ReflectionMethod $reflection): ?string
@@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GenerateMixinCollection\Models; namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GenerateMixinCollection\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GenerateMixinCollection; namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GenerateMixinCollection;
use Barryvdh\LaravelIdeHelper\Console\ModelsCommand; use Barryvdh\LaravelIdeHelper\Console\ModelsCommand;