From 0ecb0d6e4a0996f1763715ea946431dcd676ace4 Mon Sep 17 00:00:00 2001 From: Hugues Tavernier Date: Sun, 22 Oct 2023 21:53:41 +0200 Subject: [PATCH] fix phpstan warning and php-cs-fixer --- composer.json | 6 +++--- src/Asset/TagRenderer.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 1a9713f..602edd9 100644 --- a/composer.json +++ b/composer.json @@ -35,11 +35,11 @@ "phpstan/phpstan": "^1.8" }, "scripts": { - "cs-fix": "@php vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php", + "cs-fix": "php8.1 vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php", "ci-check": [ "find -L . -path ./vendor -prune -o -type f -name '*.php' -print0 | xargs -0 -n 1 -P $(nproc) php -l", - "@php vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --diff --dry-run --stop-on-violation --using-cache=no", - "@php vendor/bin/phpstan analyse --configuration=phpstan.neon" + "php8.1 vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --diff --dry-run --stop-on-violation --using-cache=no", + "php8.1 vendor/bin/phpstan analyse --configuration=phpstan.neon" ] } } \ No newline at end of file diff --git a/src/Asset/TagRenderer.php b/src/Asset/TagRenderer.php index 02d0cd2..04f1623 100644 --- a/src/Asset/TagRenderer.php +++ b/src/Asset/TagRenderer.php @@ -64,7 +64,7 @@ public function renderReactRefreshInline($devServerUrl): string '.PHP_EOL; } - public function renderScriptFile($extraAttributes = [], $content = '', $buildName = null, $isBuild): string + public function renderScriptFile($extraAttributes = [], $content = '', $buildName = null, $isBuild = true): string { if (is_null($buildName)) { $buildName = $this->defaultBuild; @@ -82,7 +82,7 @@ public function renderScriptFile($extraAttributes = [], $content = '', $buildNam return $this->renderTag('script', $event->getAttributes(), $content); } - public function renderLinkStylesheet($fileName, $extraAttributes = [], $buildName = null, $isBuild): string + public function renderLinkStylesheet($fileName, $extraAttributes = [], $buildName = null, $isBuild = true): string { if (is_null($buildName)) { $buildName = $this->defaultBuild; @@ -105,7 +105,7 @@ public function renderLinkStylesheet($fileName, $extraAttributes = [], $buildNam return $this->renderTag('link', $event->getAttributes()); } - public function renderLinkPreload($fileName, $extraAttributes = [], $buildName = null, $isBuild): string + public function renderLinkPreload($fileName, $extraAttributes = [], $buildName = null, $isBuild = true): string { if (is_null($buildName)) { $buildName = $this->defaultBuild;