Skip to content

Commit

Permalink
Update variable scope to store
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-kl1 committed Mar 22, 2024
1 parent 463b97a commit f5bbe6e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Service/UriUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ class UriUtils
{
public function __construct(private PathResolver $pathResolver) {}

public function replaceScopeCode(string $url, StoreInterface $scope): string
public function replaceScopeCode(string $url, StoreInterface $store): string
{
return $this->replaceLeadingPath($scope->getCode(), $this->pathResolver->resolve($scope), $url);
return $this->replaceLeadingPath($store->getCode(), $this->pathResolver->resolve($store), $url);
}

public function replacePathCode(string $url, StoreInterface $scope): string
public function replacePathCode(string $url, StoreInterface $store): string
{
return $this->replaceLeadingPath($this->pathResolver->resolve($scope), $scope->getCode(), $url);
return $this->replaceLeadingPath($this->pathResolver->resolve($store), $store->getCode(), $url);
}

private function replaceLeadingPath(string $search, string $replace, string $uri): string
Expand Down

0 comments on commit f5bbe6e

Please sign in to comment.