upgrade to phpstan lvl 7

This commit is contained in:
Fabio Ivona
2021-11-15 22:20:00 +01:00
parent b205b8e748
commit ca30677c53
11 changed files with 22 additions and 11 deletions

View File

@ -35,6 +35,8 @@ final class Container
/**
* Gets a dependency from the container.
*
* @param class-string $id
*
* @return object
*/
public function get(string $id)
@ -60,6 +62,8 @@ final class Container
/**
* Tries to build the given instance.
*
* @param class-string $id
*/
private function build(string $id): object
{
@ -83,6 +87,7 @@ final class Container
}
}
//@phpstan-ignore-next-line
return $this->get($candidate);
},
$constructor->getParameters()

View File

@ -77,7 +77,7 @@ final class HigherOrderMessage
*/
public function when(callable $condition): self
{
$this->condition = $condition;
$this->condition = Closure::fromCallable($condition);
return $this;
}