Skip to content

Commit

Permalink
Changed order of method arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
evertharmeling committed Nov 13, 2023
1 parent 97b672d commit ebb96d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/AssetMapper/SassCssCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function supports(MappedAsset $asset): bool

public function compile(string $content, MappedAsset $asset, AssetMapperInterface $assetMapper): string
{
$cssFile = SassBuilder::guessCssNameFromSassFile($asset->sourcePath, 0, $this->cssPathDirectory);
$cssFile = SassBuilder::guessCssNameFromSassFile($asset->sourcePath, $this->cssPathDirectory);

$asset->addFileDependency($cssFile);

Expand Down
4 changes: 2 additions & 2 deletions src/SassBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function getScssCssTargets(): array
throw new \Exception(sprintf('Could not find Sass file: "%s"', $sassPath));
}

$targets[] = $sassPath.':'.self::guessCssNameFromSassFile($sassPath, $fileName, $this->cssPath);
$targets[] = $sassPath.':'.self::guessCssNameFromSassFile($sassPath, $this->cssPath, $fileName);
}

return $targets;
Expand All @@ -90,7 +90,7 @@ public function setOutput(SymfonyStyle $output): void
/**
* @internal
*/
public static function guessCssNameFromSassFile(string $sassFile, string|int $fileName, string $outputDirectory): string
public static function guessCssNameFromSassFile(string $sassFile, string $outputDirectory, string|int $fileName = null): string
{
if (\is_int($fileName)) {
$fileName = basename($sassFile, '.scss');
Expand Down

0 comments on commit ebb96d6

Please sign in to comment.