From 363729baa6cd58588be580d512ba38e31eea8776 Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Fri, 20 Dec 2024 11:06:24 -0300 Subject: [PATCH] Update test use to T_COLON instead of T_INLINE_ELSE - related to commit 3 (332c959) --- .../ControlStructures/InlineControlStructureUnitTest.1.inc | 2 +- .../InlineControlStructureUnitTest.1.inc.fixed | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.inc b/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.inc index a8e207ea1c..ada26fb7ff 100644 --- a/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.inc +++ b/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.inc @@ -91,7 +91,7 @@ if ($error === ERROR_ONE): ?> if ($value): if ($anotherValue): foreach ($array as $element): - echo !is_null($element) ? $element : 'default'; + echo (function($element): string { return $element; } )($element); endforeach; endif; else: diff --git a/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.inc.fixed b/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.inc.fixed index b5d33be889..53c6f0952c 100644 --- a/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.inc.fixed +++ b/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.inc.fixed @@ -103,7 +103,7 @@ if ($error === ERROR_ONE): ?> if ($value): if ($anotherValue): foreach ($array as $element): - echo !is_null($element) ? $element : 'default'; + echo (function($element): string { return $element; } )($element); endforeach; endif; else: