Commit 23a55f20 authored by Jan Tvrdik's avatar Jan Tvrdik

add phpstan

parent 1bffac23
Pipeline #18236 failed with stages
in 22 seconds
......@@ -7,6 +7,9 @@
"nette/di": "~2.4",
"nette/bootstrap": "~2.4"
},
"require-dev": {
"phpstan/phpstan-shim": "~0.11.0"
},
"autoload": {
"psr-4": {
"Mangoweb\\NetteDIScope\\": "src"
......
......@@ -28,8 +28,13 @@ abstract class ScopeExtension extends Nette\DI\CompilerExtension
$innerContainer = $this->createInnerConfigurator()->createContainer();
$innerContainerReflection = new \ReflectionClass($innerContainer);
$this->innerContainerClassName = $innerContainerReflection->getName();
$this->innerContainerPath = $innerContainerReflection->getFileName();
$name = $innerContainerReflection->getName();
$fileName = $innerContainerReflection->getFileName();
assert($fileName !== false);
$this->innerContainerClassName = $name;
$this->innerContainerPath = $fileName;
$innerContainerDefinition = $builder->addDefinition($this->prefix('container'));
$innerContainerDefinition->setType(Nette\DI\Container::class);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment