Skip to content

Commit

Permalink
Refactored greedy array_merge to foreach loop
Browse files Browse the repository at this point in the history
  • Loading branch information
alongosz committed Nov 19, 2024
1 parent 68d7f5a commit d6dd382
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/Asset/ProvisionedPathResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ public function provisionResolvedPaths(array $assetsPaths, string $design): arra
$webrootDir = $this->webRootDir;
$assetsLogicalPaths = [];
foreach ($assetsPaths as $path) {
$themePath = "$webrootDir/$path";
$assetsLogicalPaths = array_merge($assetsLogicalPaths, $this->computeLogicalPathFromPhysicalAssets($themePath));
foreach ($this->computeLogicalPathFromPhysicalAssets("$webrootDir/$path") as $logicalPath) {
$assetsLogicalPaths[] = $logicalPath;
}
}

$resolvedPaths = [];
Expand Down

0 comments on commit d6dd382

Please sign in to comment.