From d1d27b494dececc4e96e608d0bb47fd948d7f959 Mon Sep 17 00:00:00 2001 From: Javier Marín Date: Wed, 14 Jul 2021 04:12:41 +0200 Subject: PhpStan support, consts visibilty and name for tokens (#89) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added handler to define not found variables Added support for string variables Fixed strings and ints comparison error * Check if variables have scalar types (int, float, string and bool) Better $onVarNotFound logic * Better support for null variables * Better support for null variables * Better support for null variables * Allow null values in `setVar` method * Support for unary positive operator * Add PhpStan config file Fix PhpStan warnings Set consts visibility Add name info to variable tokens for easier debugging Co-authored-by: Javier Marín --- src/NXP/Classes/CustomFunction.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/NXP/Classes/CustomFunction.php') diff --git a/src/NXP/Classes/CustomFunction.php b/src/NXP/Classes/CustomFunction.php index f127ad2..6e4fdc5 100644 --- a/src/NXP/Classes/CustomFunction.php +++ b/src/NXP/Classes/CustomFunction.php @@ -44,6 +44,11 @@ class CustomFunction } } + /** + * @param array $stack + * + * @throws IncorrectNumberOfFunctionParametersException + */ public function execute(array &$stack) : Token { if (count($stack) < $this->places) { -- cgit v1.2.3