Skip to content

Commit 989e725

Browse files
committed
continue instead of entire code in condition
1 parent 3a9e21a commit 989e725

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/Symfony/Component/AssetMapper/ImportMap/ImportMapManager.php

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,18 +120,20 @@ public function downloadMissingPackages(): array
120120
$packagesToDownload = [];
121121

122122
foreach ($entries as $entry) {
123-
if ($entry->isDownloaded && !$this->assetMapper->getAsset($entry->path)) {
124-
$parts = self::parsePackageName($entry->url);
125-
126-
$packagesToDownload[] = new PackageRequireOptions(
127-
$parts['package'],
128-
$parts['version'] ?? throw new RuntimeException(sprintf('Cannot get a version for the "%s" package.', $parts['package'])),
129-
true,
130-
$entry->preload,
131-
$parts['alias'] ?? $parts['package'],
132-
isset($parts['registry']) && $parts['registry'] ? $parts['registry'] : null,
133-
);
123+
if (!$entry->isDownloaded || $this->assetMapper->getAsset($entry->path)) {
124+
continue;
134125
}
126+
127+
$parts = self::parsePackageName($entry->url);
128+
129+
$packagesToDownload[] = new PackageRequireOptions(
130+
$parts['package'],
131+
$parts['version'] ?? throw new RuntimeException(sprintf('Cannot get a version for the "%s" package.', $parts['package'])),
132+
true,
133+
$entry->preload,
134+
$parts['alias'] ?? $parts['package'],
135+
isset($parts['registry']) && $parts['registry'] ? $parts['registry'] : null,
136+
);
135137
}
136138

137139
return $this->require($packagesToDownload);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy