More code style fixes (#118)

This commit is contained in:
Bruce Wells 2022-08-04 05:18:48 -07:00 committed by GitHub
parent 9538001a42
commit a041bb58ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,9 @@ class CustomFunction
public $function; public $function;
private bool $isVariadic; private bool $isVariadic;
private int $totalParamCount; private int $totalParamCount;
private int $requiredParamCount; private int $requiredParamCount;
/** /**
@ -45,6 +47,7 @@ class CustomFunction
if ($paramCountInStack < $this->requiredParamCount) { if ($paramCountInStack < $this->requiredParamCount) {
throw new IncorrectNumberOfFunctionParametersException($this->name); throw new IncorrectNumberOfFunctionParametersException($this->name);
} }
if ($paramCountInStack > $this->totalParamCount && ! $this->isVariadic) { if ($paramCountInStack > $this->totalParamCount && ! $this->isVariadic) {
throw new IncorrectNumberOfFunctionParametersException($this->name); throw new IncorrectNumberOfFunctionParametersException($this->name);
} }