endtoend-test-psl/integration/Psalm/Plugin.php

27 lines
871 B
PHP
Raw Permalink Normal View History

2021-02-09 21:15:06 +01:00
<?php
declare(strict_types=1);
namespace Psl\Integration\Psalm;
2021-02-09 21:15:06 +01:00
use Psalm\Plugin\PluginEntryPointInterface;
use Psalm\Plugin\RegistrationInterface;
use SimpleXMLElement;
/**
* @deprecated use `php-standard-library/psalm-plugin` package instead.
*
* @see https://github.com/php-standard-library/psalm-plugin
*/
2021-02-09 21:15:06 +01:00
final class Plugin implements PluginEntryPointInterface
{
public function __invoke(RegistrationInterface $registration, ?SimpleXMLElement $config = null): void
{
2021-03-06 10:10:57 +01:00
require_once __DIR__ . '/EventHandler/OptionalFunctionReturnTypeProvider.php';
2021-02-09 21:15:06 +01:00
require_once __DIR__ . '/EventHandler/ShapeFunctionReturnTypeProvider.php';
2021-03-06 10:10:57 +01:00
$registration->registerHooksFromClass(EventHandler\OptionalFunctionReturnTypeProvider::class);
2021-02-09 21:15:06 +01:00
$registration->registerHooksFromClass(EventHandler\ShapeFunctionReturnTypeProvider::class);
}
}