More code style fixes (#118)
This commit is contained in:
parent
9538001a42
commit
a041bb58ad
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue