mirror of
https://github.com/danog/psalm-insane-comparison.git
synced 2024-11-26 12:04:46 +01:00
19 lines
554 B
PHP
19 lines
554 B
PHP
<?php
|
|
namespace Orklah\PsalmInsaneComparison;
|
|
|
|
use Orklah\PsalmInsaneComparison\Hooks\InsaneComparisonAnalyzer;
|
|
use SimpleXMLElement;
|
|
use Psalm\Plugin\PluginEntryPointInterface;
|
|
use Psalm\Plugin\RegistrationInterface;
|
|
|
|
class Plugin implements PluginEntryPointInterface
|
|
{
|
|
/** @return void */
|
|
public function __invoke(RegistrationInterface $psalm, ?SimpleXMLElement $config = null): void
|
|
{
|
|
if(class_exists(InsaneComparisonAnalyzer::class)){
|
|
$psalm->registerHooksFromClass(InsaneComparisonAnalyzer::class);
|
|
}
|
|
}
|
|
}
|