diff --git a/src/Mutator/Extensions/MBString.php b/src/Mutator/Extensions/MBString.php index 9b789792c..a7b51e4f5 100644 --- a/src/Mutator/Extensions/MBString.php +++ b/src/Mutator/Extensions/MBString.php @@ -163,6 +163,8 @@ private function getConvertCaseModeValue(Node\Expr\FuncCall $node): ?int if (isset(self::MB_CASES[$modeName])) { return self::MB_CASES[$modeName]; } + } elseif ($mode instanceof Node\Scalar\LNumber) { + return $mode->value; } return null; diff --git a/tests/Mutator/Extensions/MBStringTest.php b/tests/Mutator/Extensions/MBStringTest.php index 5bd128fce..14ed4e064 100644 --- a/tests/Mutator/Extensions/MBStringTest.php +++ b/tests/Mutator/Extensions/MBStringTest.php @@ -414,11 +414,16 @@ private function provideMutationCasesForConvertCase(): Generator " [ + yield 'It converts mb_convert_case with constant similar MB_CASE_LOWER mode to strtolower' => [ " [ + " [ "