Skip to content

Commit 9841094

Browse files
committed
QA: fix phpstan
1 parent 1745719 commit 9841094

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎phpstan.neon‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ parameters:
1616
- .docs
1717

1818
ignoreErrors:
19+
20+
excludePaths:
21+
- src/Latte/WizardMacros.php

‎src/Wizard.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ protected function createComponent(string $name): ?IComponent
338338
$callableMethod = Closure::fromCallable($callable);
339339
$component = $callableMethod($name);
340340

341-
if (!$component instanceof IComponent && $this->getComponent($name) === null) {
341+
if (!($component instanceof IComponent) && $this->getComponent($name, false) === null) {
342342
throw new UnexpectedValueException(
343343
sprintf('Method %s::%s() did not return or create the desired component.', static::class, $method)
344344
);

0 commit comments

Comments
 (0)