Fix phpstan issue after updating

This commit is contained in:
Daniel Siepmann 2022-11-08 13:41:04 +01:00
parent b3e428b004
commit df28a81dae

View file

@ -60,6 +60,10 @@ class NaturalSortingProcessor implements DataProcessorInterface
}
$valuesToSort = ArrayUtility::getValueByPath($processedData, $variablePath);
if (is_array($valuesToSort) === false) {
throw new \Exception('Variable at "' . $variablePath . '" was not of type array.', 1667911071);
}
usort($valuesToSort, function (array $variable1, array $variable2) use ($variableSubPath) {
$value1 = ArrayUtility::getValueByPath($variable1, $variableSubPath);
$value2 = ArrayUtility::getValueByPath($variable2, $variableSubPath);