Skip to content

Commit eea8cd7

Browse files
refactor(trait): Use Json make static method
1 parent f0effc8 commit eea8cd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Traits/ComposerTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ private function json($file = null): Json
221221
}
222222

223223
return Arr::get($this->json, $file, function () use ($file) {
224-
return $this->json[$file] = new Json($this->getPath($file), app('files'));
224+
return $this->json[$file] = Json::make($this->getPath($file), app('files'));
225225
});
226226
}
227227

@@ -244,7 +244,7 @@ private function scan(string $path, string $class)
244244
$foundComposers = Finder::create()->files()->followLinks()->in($path)->exclude(['node_modules', 'vendor'])->name('composer.json');
245245

246246
foreach ($foundComposers as $foundComposer) {
247-
$composerJson = new Json($foundComposer, app('files'));
247+
$composerJson = Json::make($foundComposer, app('files'));
248248

249249
if ($composerJson->get('type') === $this->packageType) {
250250
$content->put($composerJson->get('name'), new $class(dirname($foundComposer)));

0 commit comments

Comments
 (0)