aboutsummaryrefslogtreecommitdiff
path: root/src/NXP/Classes/Calculator.php
diff options
context:
space:
mode:
authorBruce Wells <brucekwells@gmail.com>2022-12-22 02:52:18 +0300
committerGitHub <noreply@github.com>2022-12-22 02:52:18 +0300
commit7704ba918fbbacfd40a87725b2e01fde58b186d0 (patch)
treebd9889db81eaca0e8dc8be46303ea75d9cbf58ac /src/NXP/Classes/Calculator.php
parentc59f4cd15317754d2b50bd4bff2243012e815790 (diff)
Drop php74 (#120)
* PHPStan Level 6 * Drop PHP 7.4 support * Add PHPStan badge to readme * Code style cleanup
Diffstat (limited to 'src/NXP/Classes/Calculator.php')
-rw-r--r--src/NXP/Classes/Calculator.php10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/NXP/Classes/Calculator.php b/src/NXP/Classes/Calculator.php
index 6b63503..80dee36 100644
--- a/src/NXP/Classes/Calculator.php
+++ b/src/NXP/Classes/Calculator.php
@@ -20,22 +20,14 @@ use NXP\Exception\UnknownVariableException;
*/
class Calculator
{
- /** @var array<string, CustomFunction> */
- private array $functions = [];
-
- /** @var array<Operator> */
- private array $operators = [];
-
/**
* @todo PHP8: Use constructor property promotion -> public function __construct(private array $functions, private array $operators)
*
* @param array<string, CustomFunction> $functions
* @param array<Operator> $operators
*/
- public function __construct(array $functions, array $operators)
+ public function __construct(private array $functions, private array $operators)
{
- $this->functions = $functions;
- $this->operators = $operators;
}
/**