diff options
author | Bruce Wells <brucekwells@gmail.com> | 2022-08-04 15:18:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-04 15:18:48 +0300 |
commit | a041bb58ad02db7905a5a23de372eb811ee66dd1 (patch) | |
tree | df3e49ac08f43ca4e95921988964c34ecf4cbba9 /src/NXP/Classes/CustomFunction.php | |
parent | 9538001a42988507a29aa55eef7f59f0462665ab (diff) |
More code style fixes (#118)v2.3.1
Diffstat (limited to 'src/NXP/Classes/CustomFunction.php')
-rw-r--r-- | src/NXP/Classes/CustomFunction.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/NXP/Classes/CustomFunction.php b/src/NXP/Classes/CustomFunction.php index 43c5b55..85db379 100644 --- a/src/NXP/Classes/CustomFunction.php +++ b/src/NXP/Classes/CustomFunction.php @@ -16,7 +16,9 @@ class CustomFunction public $function; private bool $isVariadic; + private int $totalParamCount; + private int $requiredParamCount; /** @@ -45,6 +47,7 @@ class CustomFunction if ($paramCountInStack < $this->requiredParamCount) { throw new IncorrectNumberOfFunctionParametersException($this->name); } + if ($paramCountInStack > $this->totalParamCount && ! $this->isVariadic) { throw new IncorrectNumberOfFunctionParametersException($this->name); } |