Skip to content

Commit

Permalink
Merge pull request #141 from yaegassy/add-not-stopping-support
Browse files Browse the repository at this point in the history
Added support for not stopping the execution of psalm even when a error occurs.
  • Loading branch information
mr-feek authored Apr 17, 2021
2 parents d00e50e + 5753fef commit e6e34b7
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ class Plugin implements PluginEntryPointInterface

public function __invoke(RegistrationInterface $registration, ?SimpleXMLElement $config = null) : void
{
$app = ApplicationHelper::bootApp();

$fake_filesystem = new FakeFilesystem();

$view_factory = $this->getViewFactory($app, $fake_filesystem);

$cache_dir = __DIR__ . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR;

$this->ingestFacadeStubs($registration, $app, $fake_filesystem, $view_factory, $cache_dir);
$this->ingestMetaStubs($registration, $app, $fake_filesystem, $view_factory, $cache_dir);
$this->ingestModelStubs($registration, $app, $fake_filesystem, $cache_dir);
try {
$app = ApplicationHelper::bootApp();
$fake_filesystem = new FakeFilesystem();
$view_factory = $this->getViewFactory($app, $fake_filesystem);
$cache_dir = __DIR__ . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR;

$this->ingestFacadeStubs($registration, $app, $fake_filesystem, $view_factory, $cache_dir);
$this->ingestMetaStubs($registration, $app, $fake_filesystem, $view_factory, $cache_dir);
$this->ingestModelStubs($registration, $app, $fake_filesystem, $cache_dir);
} catch (\Throwable $t) {
return;
}

require_once 'ReturnTypeProvider/AuthReturnTypeProvider.php';
$registration->registerHooksFromClass(ReturnTypeProvider\AuthReturnTypeProvider::class);
Expand Down

0 comments on commit e6e34b7

Please sign in to comment.