refactor: move path handler to handlers namespace

This commit is contained in:
fiachra mcdermott 2021-06-23 06:45:40 -04:00
parent 9030eb16a6
commit a04fbb998e
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Psalm\LaravelPlugin\ReturnTypeProvider;
namespace Psalm\LaravelPlugin\Handlers\Helpers;
use Psalm\CodeLocation;
use Psalm\Context;
@ -14,7 +14,7 @@ use function get_class;
use function in_array;
use function is_string;
final class PathHelpersReturnTypeProvider implements FunctionReturnTypeProviderInterface, MethodReturnTypeProviderInterface
final class PathHandler implements FunctionReturnTypeProviderInterface, MethodReturnTypeProviderInterface
{
public static function getFunctionIds(): array
{

View File

@ -4,12 +4,12 @@ namespace Psalm\LaravelPlugin;
use Psalm\LaravelPlugin\Handlers\Application\ContainerHandler;
use Psalm\LaravelPlugin\Handlers\Application\OffsetHandler;
use Psalm\LaravelPlugin\Handlers\Eloquent\ModelPropertyHandler;
use Psalm\LaravelPlugin\Handlers\Helpers\PathHandler;
use Psalm\LaravelPlugin\Handlers\Helpers\ViewHandler;
use Psalm\LaravelPlugin\Providers\FacadeStubProvider;
use Psalm\LaravelPlugin\Providers\MetaStubProvider;
use Psalm\LaravelPlugin\Providers\ModelStubProvider;
use Psalm\LaravelPlugin\ReturnTypeProvider\ModelReturnTypeProvider;
use Psalm\LaravelPlugin\ReturnTypeProvider\PathHelpersReturnTypeProvider;
use Psalm\LaravelPlugin\ReturnTypeProvider\RelationReturnTypeProvider;
use Psalm\LaravelPlugin\ReturnTypeProvider\UrlReturnTypeProvider;
use Psalm\LaravelPlugin\Providers\ApplicationProvider;
@ -59,6 +59,8 @@ class Plugin implements PluginEntryPointInterface
$registration->registerHooksFromClass(ModelPropertyHandler::class);
require_once 'Handlers/Helpers/ViewHandler.php.php';
$registration->registerHooksFromClass(ViewHandler::class);
require_once 'Handlers/Helpers/PathHandler.php';
$registration->registerHooksFromClass(PathHandler::class);
// @todo: migrate these to `Handlers` namespace
require_once 'ReturnTypeProvider/AuthReturnTypeProvider.php';
@ -73,8 +75,6 @@ class Plugin implements PluginEntryPointInterface
$registration->registerHooksFromClass(ModelReturnTypeProvider::class);
require_once 'ReturnTypeProvider/RelationReturnTypeProvider.php';
$registration->registerHooksFromClass(RelationReturnTypeProvider::class);
require_once 'ReturnTypeProvider/PathHelpersReturnTypeProvider.php';
$registration->registerHooksFromClass(PathHelpersReturnTypeProvider::class);
}
private function generateStubFiles(): void