Skip to content

Commit 52fa06a

Browse files
ACQE-9025: Fixed non canonical scalar type cast issues
1 parent ee00b3d commit 52fa06a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Magento/FunctionalTestingFramework/Config/Converter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ protected function castNumeric($nodeValue)
210210
if (preg_match('/^\d+$/', $nodeValue)) {
211211
$nodeValue = (int) $nodeValue;
212212
} else {
213-
$nodeValue = (double) $nodeValue;
213+
$nodeValue = (float) $nodeValue;
214214
}
215215
}
216216

src/Magento/FunctionalTestingFramework/DataGenerator/Persist/OperationDataArrayResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,13 +367,13 @@ private function castValue($type, $value)
367367
case 'string':
368368
break;
369369
case 'integer':
370-
$newVal = (integer)$value;
370+
$newVal = (int)$value;
371371
break;
372372
case 'boolean':
373373
if (strtolower($newVal) === 'false') {
374374
return false;
375375
}
376-
$newVal = (boolean)$value;
376+
$newVal = (bool)$value;
377377
break;
378378
case 'number':
379379
$newVal = (float)$value;

src/Magento/FunctionalTestingFramework/Test/Objects/ActionGroupObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ private function replaceSimpleArgument($argumentValue, $variableName, $attribute
399399
if ($isInnerArgument) {
400400
return preg_replace("/(?<![\w]){$variableName}(?![(\w])/", $argumentValue, $attributeValue);
401401
} else {
402-
return str_replace("{{{$variableName}}}", $argumentValue, $attributeValue);
402+
return str_replace("{{{$variableName}}}", $argumentValue ?? "", $attributeValue ?? "");
403403
}
404404
}
405405

0 commit comments

Comments
 (0)