aboutsummaryrefslogtreecommitdiff
path: root/src/NXP/Classes/CustomFunction.php
diff options
context:
space:
mode:
authorBruce Wells <brucekwells@gmail.com>2020-05-20 04:52:26 +0300
committerBruce Wells <brucekwells@gmail.com>2020-05-20 05:17:03 +0300
commit1bb9f61423c1eed320e95a1288a146ece410e1f9 (patch)
tree0f0b86ec802a3bbb1d138b182df30e5a5067fc5c /src/NXP/Classes/CustomFunction.php
parent906021d27c4630328f68eb635a616774ab1b80e9 (diff)
typed parameters and return types
Diffstat (limited to 'src/NXP/Classes/CustomFunction.php')
-rw-r--r--src/NXP/Classes/CustomFunction.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/NXP/Classes/CustomFunction.php b/src/NXP/Classes/CustomFunction.php
index 944f7d9..636435c 100644
--- a/src/NXP/Classes/CustomFunction.php
+++ b/src/NXP/Classes/CustomFunction.php
@@ -32,7 +32,7 @@ class CustomFunction
* @param int $places
* @throws ReflectionException
*/
- public function __construct(string $name, callable $function, $places = null)
+ public function __construct(string $name, callable $function, int $places = null)
{
$this->name = $name;
$this->function = $function;
@@ -44,7 +44,7 @@ class CustomFunction
}
}
- public function execute(&$stack)
+ public function execute(array &$stack) : Token
{
if (count($stack) < $this->places) {
throw new IncorrectExpressionException();