Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Asset/AssetCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function all(): array
*
* @return AssetCollection A new collection holding both sequences.
*/
public function append(AssetInterface ...$assets): AssetCollection
public function append(AssetInterface ...$assets): self
{
return new self([...$this->assets, ...$assets]);
}
Expand Down Expand Up @@ -166,7 +166,7 @@ public function moduleScripts(): array
*
* @return AssetCollection A new collection holding both sequences.
*/
public function prepend(AssetInterface ...$assets): AssetCollection
public function prepend(AssetInterface ...$assets): self
{
return new self([...$assets, ...$this->assets]);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Html/HtmlRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function render(AssetCollection $assets, HtmlRenderOptions|null $options
private function attributesFor(AssetInterface $asset, HtmlRenderOptions $options): array
{
$attributes = [];

$nonce = $options->nonce();

if ($nonce !== null) {
Expand Down
2 changes: 1 addition & 1 deletion src/Resolver/ManifestAssetResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private function importedChunks(Manifest $manifest, ManifestChunk $chunk, array
* @param array<string, ModuleScript> $scripts Module scripts keyed by asset URL.
* @param array<string, ModulePreload> $preloads Module-preload hints keyed by asset URL.
*
* @return iterable<Stylesheet|ModuleScript|ModulePreload> Generator yielding stylesheets, then scripts, then
* @return iterable<ModulePreload|ModuleScript|Stylesheet> Generator yielding stylesheets, then scripts, then
* preloads.
*/
private function orderedAssets(array $stylesheets, array $scripts, array $preloads): iterable
Expand Down
6 changes: 3 additions & 3 deletions tests/ManifestChunkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@ public function testWithMethodsCanResetEveryOptionalValue(): void
self::assertSame(
'resources/app.js',
$configured->src(),
"Resetting must not mutate the configured source path.",
'Resetting must not mutate the configured source path.',
);
self::assertTrue(
$configured->isEntry(),
"Resetting must not mutate the configured entrypoint flag.",
'Resetting must not mutate the configured entrypoint flag.',
);
self::assertTrue(
$configured->isDynamicEntry(),
"Resetting must not mutate the configured dynamic entrypoint flag.",
'Resetting must not mutate the configured dynamic entrypoint flag.',
);
}

Expand Down
1 change: 0 additions & 1 deletion tests/ViteProductionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ public function testEntrypointsWithSameOutputFileAreDeduplicated(): void
);
}


public function testImportedCssChunkIsRenderedAndNotPreloaded(): void
{
$assets = $this->vite('css-chunk-import-manifest.json', ['resources/js/app.js'])->resolve();
Expand Down
Loading