From 280e9780fdf8c3443a4809797a757efd01b3abe9 Mon Sep 17 00:00:00 2001 From: Dwight Watson Date: Thu, 18 Dec 2025 08:44:39 +1100 Subject: [PATCH] Adjust cast and test against PHP 8.5 --- .github/workflows/test.yaml | 1 + src/Transformation/Expression/ExpressionUtils.php | 2 +- src/Transformation/Variable/Variable.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7dc97ae..bc128a7 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,6 +13,7 @@ jobs: - '8.2' - '8.3' - '8.4' + - '8.5' steps: - name: Checkout uses: actions/checkout@v4 diff --git a/src/Transformation/Expression/ExpressionUtils.php b/src/Transformation/Expression/ExpressionUtils.php index 8f24d47..e68be86 100644 --- a/src/Transformation/Expression/ExpressionUtils.php +++ b/src/Transformation/Expression/ExpressionUtils.php @@ -124,6 +124,6 @@ protected static function translateIf(array $source): mixed */ protected static function isLiteral(string $expression): bool { - return (boolean)preg_match('/^!.+!$/', $expression); + return (bool)preg_match('/^!.+!$/', $expression); } } diff --git a/src/Transformation/Variable/Variable.php b/src/Transformation/Variable/Variable.php index ebc52c6..6e55648 100644 --- a/src/Transformation/Variable/Variable.php +++ b/src/Transformation/Variable/Variable.php @@ -169,7 +169,7 @@ public function getVariableName(): string */ public static function isVariable(string $candidate): bool { - return (boolean)preg_match('/^\$[a-zA-Z]\w*$/', $candidate); + return (bool)preg_match('/^\$[a-zA-Z]\w*$/', $candidate); } /**