src/ScssAssetConverter.php
protected function getCssAsset(string $filename, string $newExtension): string
    {
        $extensionlessFilename = pathinfo($filename, PATHINFO_FILENAME);
        /** @var int $filenamePosition */
        $filenamePosition = strrpos($filename, $extensionlessFilename);
        $relativePath = substr($filename, 0, $filenamePosition);
        return "$relativePath$extensionlessFilename.$newExtension";
    }
protected function getCssAsset(string $filename, string $newExtension): string
    {
        $extensionlessFilename = pathinfo($filename, PATHINFO_FILENAME);
        /** @var int $filenamePosition */
        $filenamePosition = strrpos($filename, $extensionlessFilename);
        $relativePath = substr($filename, 0, $filenamePosition);
        return "$relativePath$extensionlessFilename.$newExtension";
    }
protected function getCssAsset ( string $ filename , string $ newExtension ) : string { $ extensionlessFilename = pathinfo ( $ filename , PATHINFO_FILENAME ) ; /** @var int $filenamePosition */ $ filenamePosition = strrpos ( $ filename , $ extensionlessFilename ) ; $ relativePath = substr ( $ filename , 0 , $ filenamePosition ) ; return "$relativePath$extensionlessFilename.$newExtension" ; }
Get the relative path and filename of the asset
@param string $filename e.g. path/asset.css
@param string $newExtension e.g. scss
@return string e.g. path/asset.scss
Get the relative path and filename of the asset