Skip to content

Commit

Permalink
Merge pull request #161 from TheDragonCode/6.x
Browse files Browse the repository at this point in the history
Fixed upgrade processor
  • Loading branch information
andrey-helldar authored May 21, 2024
2 parents 2f5b998 + d52c356 commit 82df67e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Processors/Upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ protected function replaceMethod(string $content): string
protected function replaceDeclareStrictType(string $content): string
{
return Str::of($content)
->replace('(declare\s*\(\s*strict_types\s*=\s*[1|0]\);)', '')
->pregReplace('(declare\s*\(\s*strict_types\s*=\s*[1|0]\);)', '')
->replace("<?php\n", "<?php\n\ndeclare(strict_types=1);\n")
->toString();
}
Expand Down

0 comments on commit 82df67e

Please sign in to comment.