Skip to content

Commit

Permalink
Adjust plugin implementation for vimeo/psalm#6789
Browse files Browse the repository at this point in the history
  • Loading branch information
ohader committed Nov 1, 2021
1 parent e471c29 commit d0ed0ed
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/Plugin.php
Expand Up @@ -2,16 +2,21 @@

namespace Olly\Psalm6788;

use Psalm\Plugin\FileExtensionsInterface;
use Psalm\Plugin\PluginEntryPointInterface;
use Psalm\Plugin\PluginFileExtensionsInterface;
use Psalm\Plugin\RegistrationInterface;
use SimpleXMLElement;

class Plugin implements PluginEntryPointInterface
class Plugin implements PluginEntryPointInterface, PluginFileExtensionsInterface
{
public function __invoke(RegistrationInterface $registration, ?SimpleXMLElement $config = null): void
{
$registration->addFileTypeScanner('any', AnyScanner::class);
$registration->addFileTypeAnalyzer('any', AnyAnalyzer::class);
var_dump('registered');
}

public function processFileExtensions(FileExtensionsInterface $fileExtensions, ?SimpleXMLElement $config = null): void
{
$fileExtensions->addFileTypeScanner('any', AnyScanner::class);
$fileExtensions->addFileTypeAnalyzer('any', AnyAnalyzer::class);
}
}

0 comments on commit d0ed0ed

Please sign in to comment.