We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30f5d08 commit d52c356Copy full SHA for d52c356
src/Processors/Upgrade.php
@@ -105,7 +105,7 @@ protected function replaceMethod(string $content): string
105
protected function replaceDeclareStrictType(string $content): string
106
{
107
return Str::of($content)
108
- ->replace('(declare\s*\(\s*strict_types\s*=\s*[1|0]\);)', '')
+ ->pregReplace('(declare\s*\(\s*strict_types\s*=\s*[1|0]\);)', '')
109
->replace("<?php\n", "<?php\n\ndeclare(strict_types=1);\n")
110
->toString();
111
}
0 commit comments