mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-03-31 15:07:47 +01:00
feat: make mainScript nullable
This commit is contained in:
@@ -27,14 +27,16 @@ final readonly class ResourceManager implements ResourceManagerInterface
|
||||
public function __construct(
|
||||
private TemplateEngineInterface $templateEngine,
|
||||
private AssetManagerInterface $assetManager,
|
||||
private string $mainScript,
|
||||
private array $resources,
|
||||
private ?string $mainScript = null,
|
||||
private array $resources = [],
|
||||
) {
|
||||
}
|
||||
|
||||
public function populateResponse(Response $response): Response
|
||||
{
|
||||
if (null !== $this->mainScript) {
|
||||
$response->setMainScript($this->assetManager->getPath($this->mainScript));
|
||||
}
|
||||
|
||||
$plugins = [];
|
||||
foreach ($response->getEnvelopes() as $envelope) {
|
||||
|
||||
Reference in New Issue
Block a user