diff --git a/build-cs/composer.json b/build-cs/composer.json
index ea2bcb12..7a3d4e64 100644
--- a/build-cs/composer.json
+++ b/build-cs/composer.json
@@ -1,7 +1,10 @@
{
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
"require-dev": {
- "consistence/coding-standard": "^3.5",
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
- "slevomat/coding-standard": "^4.7.2"
+ "consistence/coding-standard": "^3.10",
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
+ "slevomat/coding-standard": "^6.4.1"
}
}
diff --git a/build.xml b/build.xml
index 7d72b164..04716105 100644
--- a/build.xml
+++ b/build.xml
@@ -60,6 +60,7 @@
+
+
@@ -20,19 +21,15 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
diff --git a/src/Parser/ConstExprParser.php b/src/Parser/ConstExprParser.php
index 012a0cbe..b0ee83d9 100644
--- a/src/Parser/ConstExprParser.php
+++ b/src/Parser/ConstExprParser.php
@@ -14,13 +14,15 @@ public function parse(TokenIterator $tokens, bool $trimStrings = false): Ast\Con
$value = $tokens->currentTokenValue();
$tokens->next();
return new Ast\ConstExpr\ConstExprFloatNode($value);
+ }
- } elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_INTEGER)) {
+ if ($tokens->isCurrentTokenType(Lexer::TOKEN_INTEGER)) {
$value = $tokens->currentTokenValue();
$tokens->next();
return new Ast\ConstExpr\ConstExprIntegerNode($value);
+ }
- } elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_SINGLE_QUOTED_STRING)) {
+ if ($tokens->isCurrentTokenType(Lexer::TOKEN_SINGLE_QUOTED_STRING)) {
$value = $tokens->currentTokenValue();
if ($trimStrings) {
$value = trim($tokens->currentTokenValue(), "'");
diff --git a/src/Parser/TypeParser.php b/src/Parser/TypeParser.php
index c123ee3f..71543a72 100644
--- a/src/Parser/TypeParser.php
+++ b/src/Parser/TypeParser.php
@@ -47,7 +47,9 @@ private function parseAtomic(TokenIterator $tokens): Ast\Type\TypeNode
}
return $type;
- } elseif ($tokens->tryConsumeTokenType(Lexer::TOKEN_THIS_VARIABLE)) {
+ }
+
+ if ($tokens->tryConsumeTokenType(Lexer::TOKEN_THIS_VARIABLE)) {
$type = new Ast\Type\ThisTypeNode();
if ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {