Skip to content

Commit

Permalink
More code style fixes (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
phpfui authored Aug 4, 2022
1 parent 9538001 commit a041bb5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/NXP/Classes/CustomFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class CustomFunction
public $function;

private bool $isVariadic;

private int $totalParamCount;

private int $requiredParamCount;

/**
Expand Down Expand Up @@ -45,6 +47,7 @@ public function execute(array &$stack, int $paramCountInStack) : Token
if ($paramCountInStack < $this->requiredParamCount) {
throw new IncorrectNumberOfFunctionParametersException($this->name);
}

if ($paramCountInStack > $this->totalParamCount && ! $this->isVariadic) {
throw new IncorrectNumberOfFunctionParametersException($this->name);
}
Expand Down

0 comments on commit a041bb5

Please sign in to comment.