mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-19 02:23:11 +00:00
composer fix-style
This commit is contained in:
committed by
github-actions[bot]
parent
98252fe740
commit
7ad31cc54f
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user