ASSET-PathPackage-Enhancement - Use parent getUrl method instead of duplicating code.

This commit is contained in:
tiecoders 2019-04-07 01:25:14 +02:00
parent 50c22b3d58
commit 0c2a2bf536

View File

@ -53,11 +53,7 @@ class PathPackage extends Package
*/ */
public function getUrl($path) public function getUrl($path)
{ {
if ($this->isAbsoluteUrl($path)) { $versionedPath = parent::getUrl($path);
return $path;
}
$versionedPath = $this->getVersionStrategy()->applyVersion($path);
// if absolute or begins with /, we're done // if absolute or begins with /, we're done
if ($this->isAbsoluteUrl($versionedPath) || ($versionedPath && '/' === $versionedPath[0])) { if ($this->isAbsoluteUrl($versionedPath) || ($versionedPath && '/' === $versionedPath[0])) {