Skip to content

Commit

Permalink
standardise naming
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed Aug 15, 2022
1 parent 47e74e4 commit 4eaf839
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Illuminate/Foundation/Vite.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function __invoke($entrypoints, $buildDirectory = 'build')
$tags = collect();

foreach ($entrypoints as $entrypoint) {
$chunk = $this->findChunk($manifest, $entrypoint);
$chunk = $this->chunk($manifest, $entrypoint);

$tags->push($this->makeTagForChunk(
$entrypoint,
Expand Down Expand Up @@ -399,7 +399,7 @@ public function asset($asset, $buildDirectory = 'build')
return $this->hotAsset($asset);
}

$chunk = $this->findChunk($this->manifest($buildDirectory), $asset);
$chunk = $this->chunk($this->manifest($buildDirectory), $asset);

return asset($buildDirectory.'/'.$chunk['file']);
}
Expand Down Expand Up @@ -428,15 +428,15 @@ protected function manifest($buildDirectory)
}

/**
* Find the chunk for the given entry point / asset.
* Get the chunk for the given entry point / asset.
*
* @param array $manifest
* @param string $file
* @return array
*
* @throws \Exception
*/
protected function findChunk($manifest, $file)
protected function chunk($manifest, $file)
{
if (! isset($manifest[$file])) {
throw new Exception("Unable to locate file in Vite manifest: {$file}.");
Expand Down

0 comments on commit 4eaf839

Please sign in to comment.