From 7704ba918fbbacfd40a87725b2e01fde58b186d0 Mon Sep 17 00:00:00 2001 From: Bruce Wells Date: Wed, 21 Dec 2022 18:52:18 -0500 Subject: Drop php74 (#120) * PHPStan Level 6 * Drop PHP 7.4 support * Add PHPStan badge to readme * Code style cleanup --- src/NXP/Classes/Operator.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/NXP/Classes/Operator.php') diff --git a/src/NXP/Classes/Operator.php b/src/NXP/Classes/Operator.php index 7dee06d..231b1d9 100644 --- a/src/NXP/Classes/Operator.php +++ b/src/NXP/Classes/Operator.php @@ -7,12 +7,6 @@ use ReflectionFunction; class Operator { - public string $operator = ''; - - public bool $isRightAssoc = false; - - public int $priority = 0; - /** * @var callable(\SplStack) */ @@ -23,11 +17,8 @@ class Operator /** * Operator constructor. */ - public function __construct(string $operator, bool $isRightAssoc, int $priority, callable $function) + public function __construct(public string $operator, public bool $isRightAssoc, public int $priority, callable $function) { - $this->operator = $operator; - $this->isRightAssoc = $isRightAssoc; - $this->priority = $priority; $this->function = $function; $reflection = new ReflectionFunction($function); $this->places = $reflection->getNumberOfParameters(); -- cgit v1.2.3