Skip to content

Commit

Permalink
Fix PhpStan error.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Sep 10, 2022
1 parent 69aa8d1 commit 07ceaf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/MetaDataManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,8 @@ public static function endpointInjectDependencies(Endpoint $endpoint, Container
);
$p = $ref->getProperty($property);
$p->setAccessible(true);
$p->setValue(
$endpoint,
$container->getByType($service),
);
/** @phpstan-ignore-next-line */
$p->setValue($endpoint, $container->getByType($service));
}
}
}
2 changes: 1 addition & 1 deletion src/Middleware/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function setContainer(NetteContainer $container): void
/**
* @template T
* @param class-string<T> $type
* @return ?T
* @return T
*/
public function getByType(string $type)
{
Expand Down

0 comments on commit 07ceaf1

Please sign in to comment.