Skip to content

Commit

Permalink
Format composer-json-fixer.
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo committed Oct 31, 2019
1 parent e2d3542 commit d717fec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/composer-json-fixer
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ foreach ($files as $file) {
$composerJson = json_decode(file_get_contents($file), true);

foreach ($composerJson['autoload']['files'] ?? [] as $file) {
$autoloadFiles[] = "src/{$component}/". preg_replace('#^./#', '', $file);
$autoloadFiles[] = "src/{$component}/" . preg_replace('#^./#', '', $file);
}
foreach ($composerJson['autoload']['psr-4'] ?? [] as $ns => $dir) {
$autoload[$ns] = "src/{$component}/" . trim($dir, '/') . '/';
Expand All @@ -51,5 +51,5 @@ $json->extra->hyperf->config = $configProviders;

file_put_contents(
__DIR__ . '/../composer.json',
json_encode($json, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT)
json_encode($json, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT) . PHP_EOL
);

0 comments on commit d717fec

Please sign in to comment.