Skip to content

Commit

Permalink
Added UseUnexpectedValueExceptionPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
oliwierptak committed Mar 7, 2022
1 parent 5854465 commit 46f456f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

declare(strict_types = 1);

namespace Popo\Plugin\NamespacePlugin;

use Nette\PhpGenerator\PhpNamespace;
use Popo\Plugin\NamespacePluginInterface;

class UseUnexpectedValueExceptionPlugin implements NamespacePluginInterface
{

public function run(PhpNamespace $namespace): PhpNamespace
{
$namespace->addUse('UnexpectedValueException');

return $namespace;
}

}
4 changes: 2 additions & 2 deletions src/Popo/PopoConfigurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Popo\Plugin\ClassPlugin\RequireAllClassPlugin;
use Popo\Plugin\ClassPlugin\ToArrayClassPlugin;
use Popo\Plugin\ClassPlugin\UpdateMapClassPlugin;
use Popo\Plugin\NamespacePlugin\UseUnexpectedValueException;
use Popo\Plugin\NamespacePlugin\UseUnexpectedValueExceptionPlugin;
use Popo\Plugin\PhpFilePlugin\CommentPhpFilePlugin;
use Popo\Plugin\PhpFilePlugin\StrictTypesPhpFilePlugin;
use Popo\Plugin\PropertyPlugin\AddItemPropertyMethodPlugin;
Expand Down Expand Up @@ -47,7 +47,7 @@ class PopoConfigurator
* @var string[]
*/
protected array $namespacePluginCollection = [
UseUnexpectedValueException::class,
UseUnexpectedValueExceptionPlugin::class,
];
/**
* @var string[]
Expand Down

0 comments on commit 46f456f

Please sign in to comment.