Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeTowers authored Jan 5, 2025
1 parent 5de0809 commit e3aeefa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/system/classes/extensions/source/LocalSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ public function __construct(
}

/**
* @throws ApplicationException
* @throws ApplicationException if the provided path doesn't exist
*/
public static function fromZip(string $path): array
{
if (!File::exists($path)) {
throw new ApplicationException('Zip not found');
throw new ApplicationException("$path doesn't exist");
}

$dir = temp_path(time());
Expand All @@ -51,11 +51,11 @@ public static function fromZip(string $path): array
$sources = [];

foreach ($plugins as $code => $path) {
$sources = new static(static::TYPE_PLUGIN, code: $code, path: $path);
$sources[] = new static(static::TYPE_PLUGIN, code: $code, path: $path);
}

foreach ($themes as $code => $path) {
$sources = new static(static::TYPE_THEME, code: $code, path: $path);
$sources[] = new static(static::TYPE_THEME, code: $code, path: $path);
}

return $sources;
Expand Down

0 comments on commit e3aeefa

Please sign in to comment.