Making PHPStan happy

This commit is contained in:
Pavel Shevaev 2023-11-16 11:42:55 +03:00
parent c5e607b969
commit b0f8d4eb0f
1 changed files with 9 additions and 6 deletions

View File

@ -17,12 +17,15 @@ class BindEclLitePlugin implements \bhl_bind\BindPlugin
function init(\mtgMetaInfo $meta, \Twig\Environment $twig)
{
$loader = $twig->getLoader();
$loader->setPaths(
array_merge(
$loader->getPaths(),
[__DIR__ . "/../tpl"]
)
);
if($loader instanceof \Twig\Loader\FilesystemLoader)
{
$loader->setPaths(
array_merge(
$loader->getPaths(),
[__DIR__ . "/../tpl"]
)
);
}
//let's collect units we're responsible for
foreach($meta->getUnits() as $u)