minor #30943 [Asset] PathPackage : use parent getUrl Method instead of duplicating code (tiecoders)
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Asset] PathPackage : use parent getUrl Method instead of duplicating code
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Use parent getUrl method instead of duplicating code.
Commits
-------
0c2a2bf536
ASSET-PathPackage-Enhancement - Use parent getUrl method instead of duplicating code.
This commit is contained in:
commit
ca290396fb
|
@ -53,11 +53,7 @@ class PathPackage extends Package
|
|||
*/
|
||||
public function getUrl($path)
|
||||
{
|
||||
if ($this->isAbsoluteUrl($path)) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
$versionedPath = $this->getVersionStrategy()->applyVersion($path);
|
||||
$versionedPath = parent::getUrl($path);
|
||||
|
||||
// if absolute or begins with /, we're done
|
||||
if ($this->isAbsoluteUrl($versionedPath) || ($versionedPath && '/' === $versionedPath[0])) {
|
||||
|
|
Reference in New Issue