Skip to content

Commit

Permalink
Fix waterhole:make:extension undefined "repositories" error
Browse files Browse the repository at this point in the history
closes #6
  • Loading branch information
tobyzerner committed May 25, 2023
1 parent 720eb7c commit 28a55c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Console/MakeExtensionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function handle()
$this->installExtension($name);
}

private function addComposerRepository()
private function addComposerRepository(): void
{
$file = $this->laravel->basePath('composer.json');

Expand All @@ -90,7 +90,7 @@ private function addComposerRepository()
'url' => 'extensions/*',
];

if (in_array($repository, $decoded['repositories'])) {
if (in_array($repository, $decoded['repositories'] ?? [])) {
return;
}

Expand All @@ -101,7 +101,7 @@ private function addComposerRepository()
$this->info('Path repository added to composer.json.');
}

private function installExtension(string $name)
private function installExtension(string $name): void
{
$this->info('Installing your extension...');

Expand Down

0 comments on commit 28a55c5

Please sign in to comment.