diff --git a/src/Prefixer.php b/src/Prefixer.php index 30ed6346..a1b1d3cd 100644 --- a/src/Prefixer.php +++ b/src/Prefixer.php @@ -202,6 +202,7 @@ public function replaceNamespace(string $contents, string $originalNamespace, st |\[\s* # In a square array |\?\s* # In a ternary operator |:\s* # In a ternary operator + |\(string\)\s* # casting a namespaced class to a string ) (? {$searchNamespace} # followed by the namespace to replace