chore: optimize imports

This commit is contained in:
Claas Augner 2021-07-06 22:09:58 +02:00
parent 7f15023e45
commit 3d5109adb9
15 changed files with 20 additions and 46 deletions

View File

@ -2,8 +2,6 @@
namespace Psalm\LaravelPlugin\Fakes;
use function spl_autoload_register;
class FakeMetaCommand extends \Barryvdh\LaravelIdeHelper\Console\MetaCommand
{
/**

View File

@ -2,24 +2,13 @@
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\Support\Str;
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 get_class;
use function implode;
use function in_array;
class FakeModelsCommand extends \Barryvdh\LaravelIdeHelper\Console\ModelsCommand
{

View File

@ -2,8 +2,6 @@
namespace Psalm\LaravelPlugin\Handlers\Application;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Support\Facades\RateLimiter;
use Psalm\CodeLocation;
use Psalm\Context;
use Psalm\Internal\MethodIdentifier;
@ -18,14 +16,12 @@ use Psalm\StatementsSource;
use Psalm\Type;
use Psalm\Type\Atomic\TNamedObject;
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_keys;
use function get_class;
use function in_array;
use function is_object;
use function strtolower;
/**
* @psalm-suppress DeprecatedInterface

View File

@ -8,16 +8,12 @@ use PhpParser\Node\Expr\MethodCall;
use Psalm\CodeLocation;
use Psalm\Context;
use Psalm\Internal\MethodIdentifier;
use Psalm\LaravelPlugin\Plugin;
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\MethodReturnTypeProviderInterface;
use Psalm\StatementsSource;
use Psalm\Type;
use Psalm\Type\Union;
use function in_array;
use function strtolower;
final class ModelMethodHandler implements MethodReturnTypeProviderInterface, AfterClassLikeVisitInterface

View File

@ -9,13 +9,12 @@ use Illuminate\Database\Eloquent\Relations\HasManyThrough;
use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Database\Eloquent\Relations\MorphToMany;
use PhpParser;
use Psalm\Context;
use Psalm\CodeLocation;
use Psalm\Context;
use Psalm\LaravelPlugin\Providers\ModelStubProvider;
use Psalm\Type;
use Psalm\StatementsSource;
use Psalm\Type;
use function in_array;
use function str_replace;
/**
* @psalm-suppress DeprecatedInterface

View File

@ -21,7 +21,6 @@ use Psalm\Plugin\Hook\MethodReturnTypeProviderInterface;
use Psalm\StatementsSource;
use Psalm\Type;
use Psalm\Type\Union;
use function in_array;
final class RelationsMethodHandler implements MethodReturnTypeProviderInterface
{

View File

@ -3,10 +3,10 @@
namespace Psalm\LaravelPlugin\Handlers\Helpers;
use PhpParser;
use Psalm\Context;
use Psalm\CodeLocation;
use Psalm\Type;
use Psalm\Context;
use Psalm\StatementsSource;
use Psalm\Type;
class TransHandler implements \Psalm\Plugin\Hook\FunctionReturnTypeProviderInterface
{

View File

@ -3,10 +3,10 @@
namespace Psalm\LaravelPlugin\Handlers\Helpers;
use PhpParser;
use Psalm\Context;
use Psalm\CodeLocation;
use Psalm\Type;
use Psalm\Context;
use Psalm\StatementsSource;
use Psalm\Type;
class ViewHandler implements \Psalm\Plugin\Hook\FunctionReturnTypeProviderInterface
{

View File

@ -12,9 +12,9 @@ use Psalm\LaravelPlugin\Handlers\Helpers\RedirectHandler;
use Psalm\LaravelPlugin\Handlers\Helpers\TransHandler;
use Psalm\LaravelPlugin\Handlers\Helpers\UrlHandler;
use Psalm\LaravelPlugin\Handlers\Helpers\ViewHandler;
use Psalm\LaravelPlugin\Providers\ApplicationProvider;
use Psalm\LaravelPlugin\Providers\FacadeStubProvider;
use Psalm\LaravelPlugin\Providers\ModelStubProvider;
use Psalm\LaravelPlugin\Providers\ApplicationProvider;
use Psalm\Plugin\PluginEntryPointInterface;
use Psalm\Plugin\RegistrationInterface;
use SimpleXMLElement;

View File

@ -5,8 +5,8 @@ namespace Psalm\LaravelPlugin\Providers;
use Illuminate\Foundation\Application as LaravelApplication;
use Orchestra\Testbench\Concerns\CreatesApplication;
use function file_exists;
use function getcwd;
use function get_class;
use function getcwd;
final class ApplicationProvider
{

View File

@ -3,7 +3,6 @@
namespace Psalm\LaravelPlugin\Providers;
use Psalm\LaravelPlugin\Fakes\FakeFilesystem;
use Psalm\LaravelPlugin\Providers\ApplicationProvider;
use function unlink;
final class FacadeStubProvider implements GeneratesStubs

View File

@ -5,8 +5,8 @@ namespace Psalm\LaravelPlugin\Providers;
use Psalm\LaravelPlugin\Fakes\FakeFilesystem;
use Psalm\LaravelPlugin\Fakes\FakeModelsCommand;
use Psalm\LaravelPlugin\Handlers\Eloquent\Schema\SchemaAggregator;
use function glob;
use function dirname;
use function glob;
use function unlink;
final class ModelStubProvider implements GeneratesStubs

View File

@ -3,7 +3,6 @@
namespace Illuminate\Support;
use ArrayAccess;
use ArrayObject;
class Optional implements ArrayAccess
{

View File

@ -10,12 +10,12 @@ use Psalm\Type\Atomic\TNamedObject;
use Psalm\Type\Union;
use ReflectionException;
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 count;
use function get_class;
use function is_null;
use function is_object;
use function is_string;
final class ContainerResolver
{

View File

@ -3,7 +3,6 @@
namespace Tests\Psalm\LaravelPlugin\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphTo;
final class Image extends Model