mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-11-30 04:39:01 +01:00
chore: optimize imports
This commit is contained in:
parent
7f15023e45
commit
3d5109adb9
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace Psalm\LaravelPlugin\Fakes;
|
namespace Psalm\LaravelPlugin\Fakes;
|
||||||
|
|
||||||
use function spl_autoload_register;
|
|
||||||
|
|
||||||
class FakeMetaCommand extends \Barryvdh\LaravelIdeHelper\Console\MetaCommand
|
class FakeMetaCommand extends \Barryvdh\LaravelIdeHelper\Console\MetaCommand
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -2,24 +2,13 @@
|
|||||||
|
|
||||||
namespace Psalm\LaravelPlugin\Fakes;
|
namespace Psalm\LaravelPlugin\Fakes;
|
||||||
|
|
||||||
use Composer\Autoload\ClassMapGenerator;
|
|
||||||
use Illuminate\Console\Command;
|
|
||||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
|
||||||
use Illuminate\Support\Str;
|
|
||||||
use Illuminate\Filesystem\Filesystem;
|
use Illuminate\Filesystem\Filesystem;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
use Psalm\LaravelPlugin\Handlers\Eloquent\Schema\SchemaAggregator;
|
use Psalm\LaravelPlugin\Handlers\Eloquent\Schema\SchemaAggregator;
|
||||||
use ReflectionClass;
|
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
|
||||||
use Barryvdh\Reflection\DocBlock;
|
|
||||||
use Barryvdh\Reflection\DocBlock\Context;
|
|
||||||
use Barryvdh\Reflection\DocBlock\Tag;
|
|
||||||
use Barryvdh\Reflection\DocBlock\Serializer as DocBlockSerializer;
|
|
||||||
use function get_class;
|
|
||||||
use function in_array;
|
|
||||||
use function config;
|
use function config;
|
||||||
|
use function get_class;
|
||||||
use function implode;
|
use function implode;
|
||||||
|
use function in_array;
|
||||||
|
|
||||||
class FakeModelsCommand extends \Barryvdh\LaravelIdeHelper\Console\ModelsCommand
|
class FakeModelsCommand extends \Barryvdh\LaravelIdeHelper\Console\ModelsCommand
|
||||||
{
|
{
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace Psalm\LaravelPlugin\Handlers\Application;
|
namespace Psalm\LaravelPlugin\Handlers\Application;
|
||||||
|
|
||||||
use Illuminate\Foundation\AliasLoader;
|
|
||||||
use Illuminate\Support\Facades\RateLimiter;
|
|
||||||
use Psalm\CodeLocation;
|
use Psalm\CodeLocation;
|
||||||
use Psalm\Context;
|
use Psalm\Context;
|
||||||
use Psalm\Internal\MethodIdentifier;
|
use Psalm\Internal\MethodIdentifier;
|
||||||
@ -18,14 +16,12 @@ use Psalm\StatementsSource;
|
|||||||
use Psalm\Type;
|
use Psalm\Type;
|
||||||
use Psalm\Type\Atomic\TNamedObject;
|
use Psalm\Type\Atomic\TNamedObject;
|
||||||
use Psalm\Type\Union;
|
use Psalm\Type\Union;
|
||||||
use function in_array;
|
|
||||||
use function array_merge;
|
|
||||||
use function array_values;
|
|
||||||
use function strtolower;
|
|
||||||
use function get_class;
|
|
||||||
use function array_filter;
|
use function array_filter;
|
||||||
use function array_keys;
|
use function array_keys;
|
||||||
|
use function get_class;
|
||||||
|
use function in_array;
|
||||||
use function is_object;
|
use function is_object;
|
||||||
|
use function strtolower;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @psalm-suppress DeprecatedInterface
|
* @psalm-suppress DeprecatedInterface
|
||||||
|
@ -8,16 +8,12 @@ use PhpParser\Node\Expr\MethodCall;
|
|||||||
use Psalm\CodeLocation;
|
use Psalm\CodeLocation;
|
||||||
use Psalm\Context;
|
use Psalm\Context;
|
||||||
use Psalm\Internal\MethodIdentifier;
|
use Psalm\Internal\MethodIdentifier;
|
||||||
use Psalm\LaravelPlugin\Plugin;
|
|
||||||
use Psalm\LaravelPlugin\Util\ProxyMethodReturnTypeProvider;
|
use Psalm\LaravelPlugin\Util\ProxyMethodReturnTypeProvider;
|
||||||
use Psalm\Plugin\Hook\MethodReturnTypeProviderInterface;
|
|
||||||
use Psalm\Plugin\Hook\PropertyExistenceProviderInterface;
|
|
||||||
use Psalm\Plugin\Hook\PropertyTypeProviderInterface;
|
|
||||||
use Psalm\Plugin\Hook\AfterClassLikeVisitInterface;
|
use Psalm\Plugin\Hook\AfterClassLikeVisitInterface;
|
||||||
|
use Psalm\Plugin\Hook\MethodReturnTypeProviderInterface;
|
||||||
use Psalm\StatementsSource;
|
use Psalm\StatementsSource;
|
||||||
use Psalm\Type;
|
use Psalm\Type;
|
||||||
use Psalm\Type\Union;
|
use Psalm\Type\Union;
|
||||||
use function in_array;
|
|
||||||
use function strtolower;
|
use function strtolower;
|
||||||
|
|
||||||
final class ModelMethodHandler implements MethodReturnTypeProviderInterface, AfterClassLikeVisitInterface
|
final class ModelMethodHandler implements MethodReturnTypeProviderInterface, AfterClassLikeVisitInterface
|
||||||
|
@ -9,13 +9,12 @@ use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
|||||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||||
use PhpParser;
|
use PhpParser;
|
||||||
use Psalm\Context;
|
|
||||||
use Psalm\CodeLocation;
|
use Psalm\CodeLocation;
|
||||||
|
use Psalm\Context;
|
||||||
use Psalm\LaravelPlugin\Providers\ModelStubProvider;
|
use Psalm\LaravelPlugin\Providers\ModelStubProvider;
|
||||||
use Psalm\Type;
|
|
||||||
use Psalm\StatementsSource;
|
use Psalm\StatementsSource;
|
||||||
|
use Psalm\Type;
|
||||||
use function in_array;
|
use function in_array;
|
||||||
use function str_replace;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @psalm-suppress DeprecatedInterface
|
* @psalm-suppress DeprecatedInterface
|
||||||
|
@ -21,7 +21,6 @@ use Psalm\Plugin\Hook\MethodReturnTypeProviderInterface;
|
|||||||
use Psalm\StatementsSource;
|
use Psalm\StatementsSource;
|
||||||
use Psalm\Type;
|
use Psalm\Type;
|
||||||
use Psalm\Type\Union;
|
use Psalm\Type\Union;
|
||||||
use function in_array;
|
|
||||||
|
|
||||||
final class RelationsMethodHandler implements MethodReturnTypeProviderInterface
|
final class RelationsMethodHandler implements MethodReturnTypeProviderInterface
|
||||||
{
|
{
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
namespace Psalm\LaravelPlugin\Handlers\Helpers;
|
namespace Psalm\LaravelPlugin\Handlers\Helpers;
|
||||||
|
|
||||||
use PhpParser;
|
use PhpParser;
|
||||||
use Psalm\Context;
|
|
||||||
use Psalm\CodeLocation;
|
use Psalm\CodeLocation;
|
||||||
use Psalm\Type;
|
use Psalm\Context;
|
||||||
use Psalm\StatementsSource;
|
use Psalm\StatementsSource;
|
||||||
|
use Psalm\Type;
|
||||||
|
|
||||||
class TransHandler implements \Psalm\Plugin\Hook\FunctionReturnTypeProviderInterface
|
class TransHandler implements \Psalm\Plugin\Hook\FunctionReturnTypeProviderInterface
|
||||||
{
|
{
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
namespace Psalm\LaravelPlugin\Handlers\Helpers;
|
namespace Psalm\LaravelPlugin\Handlers\Helpers;
|
||||||
|
|
||||||
use PhpParser;
|
use PhpParser;
|
||||||
use Psalm\Context;
|
|
||||||
use Psalm\CodeLocation;
|
use Psalm\CodeLocation;
|
||||||
use Psalm\Type;
|
use Psalm\Context;
|
||||||
use Psalm\StatementsSource;
|
use Psalm\StatementsSource;
|
||||||
|
use Psalm\Type;
|
||||||
|
|
||||||
class ViewHandler implements \Psalm\Plugin\Hook\FunctionReturnTypeProviderInterface
|
class ViewHandler implements \Psalm\Plugin\Hook\FunctionReturnTypeProviderInterface
|
||||||
{
|
{
|
||||||
|
@ -12,9 +12,9 @@ use Psalm\LaravelPlugin\Handlers\Helpers\RedirectHandler;
|
|||||||
use Psalm\LaravelPlugin\Handlers\Helpers\TransHandler;
|
use Psalm\LaravelPlugin\Handlers\Helpers\TransHandler;
|
||||||
use Psalm\LaravelPlugin\Handlers\Helpers\UrlHandler;
|
use Psalm\LaravelPlugin\Handlers\Helpers\UrlHandler;
|
||||||
use Psalm\LaravelPlugin\Handlers\Helpers\ViewHandler;
|
use Psalm\LaravelPlugin\Handlers\Helpers\ViewHandler;
|
||||||
|
use Psalm\LaravelPlugin\Providers\ApplicationProvider;
|
||||||
use Psalm\LaravelPlugin\Providers\FacadeStubProvider;
|
use Psalm\LaravelPlugin\Providers\FacadeStubProvider;
|
||||||
use Psalm\LaravelPlugin\Providers\ModelStubProvider;
|
use Psalm\LaravelPlugin\Providers\ModelStubProvider;
|
||||||
use Psalm\LaravelPlugin\Providers\ApplicationProvider;
|
|
||||||
use Psalm\Plugin\PluginEntryPointInterface;
|
use Psalm\Plugin\PluginEntryPointInterface;
|
||||||
use Psalm\Plugin\RegistrationInterface;
|
use Psalm\Plugin\RegistrationInterface;
|
||||||
use SimpleXMLElement;
|
use SimpleXMLElement;
|
||||||
|
@ -5,8 +5,8 @@ namespace Psalm\LaravelPlugin\Providers;
|
|||||||
use Illuminate\Foundation\Application as LaravelApplication;
|
use Illuminate\Foundation\Application as LaravelApplication;
|
||||||
use Orchestra\Testbench\Concerns\CreatesApplication;
|
use Orchestra\Testbench\Concerns\CreatesApplication;
|
||||||
use function file_exists;
|
use function file_exists;
|
||||||
use function getcwd;
|
|
||||||
use function get_class;
|
use function get_class;
|
||||||
|
use function getcwd;
|
||||||
|
|
||||||
final class ApplicationProvider
|
final class ApplicationProvider
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
namespace Psalm\LaravelPlugin\Providers;
|
namespace Psalm\LaravelPlugin\Providers;
|
||||||
|
|
||||||
use Psalm\LaravelPlugin\Fakes\FakeFilesystem;
|
use Psalm\LaravelPlugin\Fakes\FakeFilesystem;
|
||||||
use Psalm\LaravelPlugin\Providers\ApplicationProvider;
|
|
||||||
use function unlink;
|
use function unlink;
|
||||||
|
|
||||||
final class FacadeStubProvider implements GeneratesStubs
|
final class FacadeStubProvider implements GeneratesStubs
|
||||||
|
@ -5,8 +5,8 @@ namespace Psalm\LaravelPlugin\Providers;
|
|||||||
use Psalm\LaravelPlugin\Fakes\FakeFilesystem;
|
use Psalm\LaravelPlugin\Fakes\FakeFilesystem;
|
||||||
use Psalm\LaravelPlugin\Fakes\FakeModelsCommand;
|
use Psalm\LaravelPlugin\Fakes\FakeModelsCommand;
|
||||||
use Psalm\LaravelPlugin\Handlers\Eloquent\Schema\SchemaAggregator;
|
use Psalm\LaravelPlugin\Handlers\Eloquent\Schema\SchemaAggregator;
|
||||||
use function glob;
|
|
||||||
use function dirname;
|
use function dirname;
|
||||||
|
use function glob;
|
||||||
use function unlink;
|
use function unlink;
|
||||||
|
|
||||||
final class ModelStubProvider implements GeneratesStubs
|
final class ModelStubProvider implements GeneratesStubs
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
namespace Illuminate\Support;
|
namespace Illuminate\Support;
|
||||||
|
|
||||||
use ArrayAccess;
|
use ArrayAccess;
|
||||||
use ArrayObject;
|
|
||||||
|
|
||||||
class Optional implements ArrayAccess
|
class Optional implements ArrayAccess
|
||||||
{
|
{
|
||||||
|
@ -10,12 +10,12 @@ use Psalm\Type\Atomic\TNamedObject;
|
|||||||
use Psalm\Type\Union;
|
use Psalm\Type\Union;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use function array_key_exists;
|
use function array_key_exists;
|
||||||
use function get_class;
|
|
||||||
use function count;
|
|
||||||
use function is_string;
|
|
||||||
use function is_object;
|
|
||||||
use function class_exists;
|
use function class_exists;
|
||||||
|
use function count;
|
||||||
|
use function get_class;
|
||||||
use function is_null;
|
use function is_null;
|
||||||
|
use function is_object;
|
||||||
|
use function is_string;
|
||||||
|
|
||||||
final class ContainerResolver
|
final class ContainerResolver
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
namespace Tests\Psalm\LaravelPlugin\Models;
|
namespace Tests\Psalm\LaravelPlugin\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
||||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||||
|
|
||||||
final class Image extends Model
|
final class Image extends Model
|
||||||
|
Loading…
Reference in New Issue
Block a user