2020-08-10 16:49:53 +02:00
|
|
|
<?php
|
2021-12-15 04:58:32 +01:00
|
|
|
|
2023-10-19 14:16:41 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-08-10 16:49:53 +02:00
|
|
|
namespace Psalm\Test\Config\Plugin;
|
|
|
|
|
2021-12-03 20:11:20 +01:00
|
|
|
use Psalm\Plugin\PluginEntryPointInterface;
|
2021-12-04 21:55:53 +01:00
|
|
|
use Psalm\Plugin\RegistrationInterface;
|
|
|
|
use Psalm\Test\Config\Plugin\Hook\FileProvider;
|
2020-08-10 16:49:53 +02:00
|
|
|
use SimpleXMLElement;
|
|
|
|
|
|
|
|
/** @psalm-suppress UnusedClass */
|
2021-12-03 20:11:20 +01:00
|
|
|
class FilePlugin implements PluginEntryPointInterface
|
2020-08-10 16:49:53 +02:00
|
|
|
{
|
2021-12-04 21:55:53 +01:00
|
|
|
public function __invoke(RegistrationInterface $registration, ?SimpleXMLElement $config = null): void
|
2020-08-10 16:49:53 +02:00
|
|
|
{
|
|
|
|
require_once __DIR__ . '/Hook/FileProvider.php';
|
|
|
|
|
2021-12-04 21:55:53 +01:00
|
|
|
$registration->registerHooksFromClass(FileProvider::class);
|
2020-08-10 16:49:53 +02:00
|
|
|
}
|
|
|
|
}
|