psalm-insane-comparison/Plugin.php

19 lines
530 B
PHP
Raw Normal View History

2020-12-03 23:46:52 +01:00
<?php
namespace Orklah\PsalmStrictVisibility;
use Orklah\PsalmInsaneComparison\Hooks\InsaneComparison;
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(InsaneComparison::class)){
$psalm->registerHooksFromClass(InsaneComparison::class);
}
}
}