chore: phpstan level 5

This commit is contained in:
Nuno Maduro
2021-11-14 21:23:02 +00:00
parent 8ace01b6f1
commit 183f975166
23 changed files with 65 additions and 796 deletions

View File

@ -18,14 +18,14 @@ final class HigherOrderMessage
/**
* An optional condition that will determine if the message will be executed.
*
* @var (callable(): bool)|null
* @var (Closure(): bool)|null
*/
public $condition;
public ?Closure $condition = null;
/**
* Creates a new higher order message.
*
* @param array<int, mixed>|null $arguments
* @param array<int, mixed> $arguments
*/
public function __construct(
public string $filename,
@ -41,7 +41,6 @@ final class HigherOrderMessage
*/
public function call(object $target): mixed
{
/* @phpstan-ignore-next-line */
if (is_callable($this->condition) && call_user_func(Closure::bind($this->condition, $target)) === false) {
return $target;
}