Skip to content

Commit

Permalink
Add support for casting a namespaced class to a string. Fixes #88
Browse files Browse the repository at this point in the history
  • Loading branch information
sovetski authored Mar 7, 2024
1 parent 6cb008b commit 6487af4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Prefixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
{$searchNamespace} # followed by the namespace to replace
Expand Down

0 comments on commit 6487af4

Please sign in to comment.