Skip to content

Commit

Permalink
Add standards fix for composer name property
Browse files Browse the repository at this point in the history
  • Loading branch information
billtomczak committed Jan 27, 2022
1 parent ae45e7b commit cb60d17
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tasks/StandardsFixesTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ protected function updateComposer(string $composerPath)
$composer = str_replace($match[0], $fixed, $composer);
}

if (preg_match('#"name"\s*:\s*"(.*)"#', $composer, $match)) {
$fixed = str_replace($match[1], strtolower($match[1]), $match[0]);
$composer = str_replace($match[0], $fixed, $composer);
}

if ($sha1 != sha1($composer)) {
file_put_contents($composerPath, $composer);
$this->log(
Expand Down

0 comments on commit cb60d17

Please sign in to comment.