diff --git a/.github/workflows/integrate.yml b/.github/workflows/integrate.yml index 499a5d3..dcef2e8 100644 --- a/.github/workflows/integrate.yml +++ b/.github/workflows/integrate.yml @@ -70,6 +70,7 @@ jobs: php-version: - "8.2" - "8.3" + - "8.4" dependencies: - "highest" runs-on: ${{ matrix.operating-system }} diff --git a/composer.json b/composer.json index 966f004..d2c7326 100644 --- a/composer.json +++ b/composer.json @@ -49,23 +49,23 @@ "require-dev": { "ext-sockets": "*", "dbrekelmans/bdi": "^1.1", - "ekino/phpstan-banned-code": "^1.0", + "ekino/phpstan-banned-code": "^1.0|^2.0|^3.0", "ergebnis/phpunit-slow-test-detector": "^2.14", - "infection/infection": "^0.28", + "infection/infection": "^0.28|^0.29", "matthiasnoback/symfony-config-test": "^5.1", "php-parallel-lint/php-parallel-lint": "^1.4", "phpstan/extension-installer": "^1.1", - "phpstan/phpdoc-parser": "^1.28", - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-beberlei-assert": "^1.0", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.4", - "phpstan/phpstan-strict-rules": "^1.0", - "phpstan/phpstan-symfony": "^1.4", + "phpstan/phpdoc-parser": "^1.28|^2.0", + "phpstan/phpstan": "^1.0|^2.0", + "phpstan/phpstan-beberlei-assert": "^1.0|^2.0", + "phpstan/phpstan-deprecation-rules": "^1.0|^2.0", + "phpstan/phpstan-phpunit": "^1.4|^2.0", + "phpstan/phpstan-strict-rules": "^1.0|^2.0", + "phpstan/phpstan-symfony": "^1.4|^2.0", "phpunit/phpunit": "^10.1|^11.0", - "rector/rector": "^1.0", - "staabm/phpstan-todo-by": "^0.1.27", - "struggle-for-php/sfp-phpstan-psr-log": "^0.21.0", + "rector/rector": "^1.0|^2.0", + "staabm/phpstan-todo-by": "^0.1.27|^0.2", + "struggle-for-php/sfp-phpstan-psr-log": "^0.21.0|^0.22|^0.23", "symfony/filesystem": "^6.4|^7.0", "symfony/framework-bundle": "^6.4|^7.0", "symfony/mime": "^6.4|^7.0", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index ed22a48..5077e76 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,611 +1,1399 @@ parameters: ignoreErrors: - - message: "#^Only iterables can be unpacked, mixed given in argument \\#1\\.$#" + message: '#^Only iterables can be unpacked, mixed given in argument \#1\.$#' + identifier: argument.unpackNonIterable count: 1 path: src/CachingStrategy/AssetCache.php - - message: "#^Parameter \\#1 \\$name of method SpomkyLabs\\\\PwaBundle\\\\CachingStrategy\\\\WorkboxCacheStrategy\\:\\:withName\\(\\) expects string, string\\|null given\\.$#" + message: '#^Parameter \#1 \$name of method SpomkyLabs\\PwaBundle\\CachingStrategy\\WorkboxCacheStrategy\:\:withName\(\) expects string, string\|null given\.$#' + identifier: argument.type count: 1 path: src/CachingStrategy/AssetCache.php - - message: "#^Parameter \\#1 \\$preloadUrl of method SpomkyLabs\\\\PwaBundle\\\\CachingStrategy\\\\WorkboxCacheStrategy\\:\\:withPreloadUrl\\(\\) expects string, mixed given\\.$#" + message: '#^Parameter \#1 \$preloadUrl of method SpomkyLabs\\PwaBundle\\CachingStrategy\\WorkboxCacheStrategy\:\:withPreloadUrl\(\) expects string, mixed given\.$#' + identifier: argument.type count: 1 path: src/CachingStrategy/AssetCache.php - - message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#" + message: '#^Parameter \#1 \$value of function count expects array\|Countable, mixed given\.$#' + identifier: argument.type count: 1 path: src/CachingStrategy/AssetCache.php - - message: "#^Only iterables can be unpacked, mixed given in argument \\#1\\.$#" + message: '#^Only iterables can be unpacked, mixed given in argument \#1\.$#' + identifier: argument.unpackNonIterable count: 1 path: src/CachingStrategy/FontCache.php - - message: "#^Parameter \\#1 \\$preloadUrl of method SpomkyLabs\\\\PwaBundle\\\\CachingStrategy\\\\WorkboxCacheStrategy\\:\\:withPreloadUrl\\(\\) expects string, mixed given\\.$#" + message: '#^Parameter \#1 \$preloadUrl of method SpomkyLabs\\PwaBundle\\CachingStrategy\\WorkboxCacheStrategy\:\:withPreloadUrl\(\) expects string, mixed given\.$#' + identifier: argument.type count: 1 path: src/CachingStrategy/FontCache.php - - message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#" + message: '#^Parameter \#1 \$value of function count expects array\|Countable, mixed given\.$#' + identifier: argument.type count: 2 path: src/CachingStrategy/FontCache.php - - message: "#^Only iterables can be unpacked, mixed given in argument \\#1\\.$#" + message: '#^Only iterables can be unpacked, mixed given in argument \#1\.$#' + identifier: argument.unpackNonIterable count: 1 path: src/CachingStrategy/ResourceCaches.php - - message: "#^Parameter \\#1 \\$preloadUrl of method SpomkyLabs\\\\PwaBundle\\\\CachingStrategy\\\\WorkboxCacheStrategy\\:\\:withPreloadUrl\\(\\) expects string, mixed given\\.$#" + message: '#^Parameter \#1 \$headersToCheck of static method SpomkyLabs\\PwaBundle\\WorkboxPlugin\\BroadcastUpdatePlugin\:\:create\(\) expects array\, array\ given\.$#' + identifier: argument.type count: 1 path: src/CachingStrategy/ResourceCaches.php - - message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#" + message: '#^Parameter \#1 \$preloadUrl of method SpomkyLabs\\PwaBundle\\CachingStrategy\\WorkboxCacheStrategy\:\:withPreloadUrl\(\) expects string, mixed given\.$#' + identifier: argument.type count: 1 path: src/CachingStrategy/ResourceCaches.php - - message: "#^Part \\$this\\-\\>options\\['networkTimeoutSeconds'\\] \\(mixed\\) of encapsed string cannot be cast to string\\.$#" + message: '#^Parameter \#1 \$value of function count expects array\|Countable, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/CachingStrategy/ResourceCaches.php + + - + message: '#^Part \$this\-\>options\[''networkTimeoutSeconds''\] \(mixed\) of encapsed string cannot be cast to string\.$#' + identifier: encapsedStringPart.nonString count: 1 path: src/CachingStrategy/WorkboxCacheStrategy.php - - message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" + message: '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable count: 1 path: src/Command/CreateIconsCommand.php - - message: "#^Cannot cast mixed to int\\.$#" + message: '#^Cannot cast mixed to int\.$#' + identifier: cast.int count: 1 path: src/Command/CreateIconsCommand.php - - message: "#^Cannot cast mixed to string\\.$#" + message: '#^Cannot cast mixed to string\.$#' + identifier: cast.string count: 1 path: src/Command/CreateIconsCommand.php - - message: "#^Parameter \\#1 \\$image of method SpomkyLabs\\\\PwaBundle\\\\ImageProcessor\\\\ImageProcessorInterface\\:\\:process\\(\\) expects string, string\\|false given\\.$#" + message: '#^Parameter \#1 \$image of method SpomkyLabs\\PwaBundle\\ImageProcessor\\ImageProcessorInterface\:\:process\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 1 path: src/Command/CreateIconsCommand.php - - message: "#^Parameter \\#1 \\$source of method SpomkyLabs\\\\PwaBundle\\\\Command\\\\CreateIconsCommand\\:\\:getSourcePath\\(\\) expects string, mixed given\\.$#" + message: '#^Parameter \#1 \$source of method SpomkyLabs\\PwaBundle\\Command\\CreateIconsCommand\:\:getSourcePath\(\) expects string, mixed given\.$#' + identifier: argument.type count: 1 path: src/Command/CreateIconsCommand.php - - message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" + message: '#^Parameter \#3 \.\.\.\$values of function sprintf expects bool\|float\|int\|string\|null, mixed given\.$#' + identifier: argument.type count: 1 path: src/Command/CreateIconsCommand.php - - message: "#^Cannot cast mixed to int\\.$#" + message: '#^Cannot cast mixed to int\.$#' + identifier: cast.int count: 2 path: src/Command/CreateScreenshotCommand.php - - message: "#^Cannot cast mixed to string\\.$#" + message: '#^Cannot cast mixed to string\.$#' + identifier: cast.string count: 2 path: src/Command/CreateScreenshotCommand.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Command\\\\CreateScreenshotCommand\\:\\:getDefaultArguments\\(\\) return type has no value type specified in iterable type array\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Command\\CreateScreenshotCommand\:\:getAvailablePort\(\) should return int but returns mixed\.$#' + identifier: return.type count: 1 path: src/Command/CreateScreenshotCommand.php - - message: "#^Only booleans are allowed in a negated boolean, mixed given\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Command\\CreateScreenshotCommand\:\:getDefaultArguments\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: src/Command/CreateScreenshotCommand.php - - message: "#^Only booleans are allowed in an if condition, mixed given\\.$#" + message: '#^Only booleans are allowed in a negated boolean, mixed given\.$#' + identifier: booleanNot.exprNotBoolean + count: 1 + path: src/Command/CreateScreenshotCommand.php + + - + message: '#^Only booleans are allowed in an if condition, mixed given\.$#' + identifier: if.condNotBoolean count: 3 path: src/Command/CreateScreenshotCommand.php - - message: "#^Parameter \\#2 \\$uri of method Symfony\\\\Component\\\\Panther\\\\Client\\:\\:request\\(\\) expects string, mixed given\\.$#" + message: '#^Parameter \#2 \$uri of method Symfony\\Component\\Panther\\Client\:\:request\(\) expects string, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Command/CreateScreenshotCommand.php + + - + message: '#^Parameter \#3 \.\.\.\$values of function sprintf expects bool\|float\|int\|string\|null, mixed given\.$#' + identifier: argument.type count: 1 path: src/Command/CreateScreenshotCommand.php - - message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" + message: '#^Parameter \$arguments of static method Symfony\\Component\\Panther\\Client\:\:createChromeClient\(\) expects array\\|null, array given\.$#' + identifier: argument.type count: 1 path: src/Command/CreateScreenshotCommand.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\BackgroundSync has an uninitialized property \\$forceSyncFallback\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Strict comparison using \!\=\= between non\-empty\-string and '''' will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: src/Command/CreateScreenshotCommand.php + + - + message: '#^Cannot access offset ''data'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 4 + path: src/DataCollector/PwaCollector.php + + - + message: '#^Cannot access offset ''files'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 3 + path: src/DataCollector/PwaCollector.php + + - + message: '#^Cannot access property \$workbox on mixed\.$#' + identifier: property.nonObject + count: 1 + path: src/DataCollector/PwaCollector.php + + - + message: '#^Method SpomkyLabs\\PwaBundle\\DataCollector\\PwaCollector\:\:getCachingStrategies\(\) should return array\ but returns mixed\.$#' + identifier: return.type + count: 1 + path: src/DataCollector/PwaCollector.php + + - + message: '#^Method SpomkyLabs\\PwaBundle\\DataCollector\\PwaCollector\:\:getData\(\) should return array\\|Symfony\\Component\\VarDumper\\Cloner\\Data but returns array\|Symfony\\Component\\VarDumper\\Cloner\\Data\.$#' + identifier: return.type + count: 1 + path: src/DataCollector/PwaCollector.php + + - + message: '#^Method SpomkyLabs\\PwaBundle\\DataCollector\\PwaCollector\:\:getFavicons\(\) should return SpomkyLabs\\PwaBundle\\Dto\\Favicons but returns mixed\.$#' + identifier: return.type + count: 1 + path: src/DataCollector/PwaCollector.php + + - + message: '#^Method SpomkyLabs\\PwaBundle\\DataCollector\\PwaCollector\:\:getFaviconsFiles\(\) should return array\ but returns mixed\.$#' + identifier: return.type + count: 1 + path: src/DataCollector/PwaCollector.php + + - + message: '#^Method SpomkyLabs\\PwaBundle\\DataCollector\\PwaCollector\:\:getManifest\(\) should return SpomkyLabs\\PwaBundle\\Dto\\Manifest but returns mixed\.$#' + identifier: return.type + count: 1 + path: src/DataCollector/PwaCollector.php + + - + message: '#^Method SpomkyLabs\\PwaBundle\\DataCollector\\PwaCollector\:\:getManifestFiles\(\) should return array\ but returns mixed\.$#' + identifier: return.type + count: 1 + path: src/DataCollector/PwaCollector.php + + - + message: '#^Method SpomkyLabs\\PwaBundle\\DataCollector\\PwaCollector\:\:getServiceWorker\(\) should return SpomkyLabs\\PwaBundle\\Dto\\ServiceWorker but returns mixed\.$#' + identifier: return.type + count: 1 + path: src/DataCollector/PwaCollector.php + + - + message: '#^Method SpomkyLabs\\PwaBundle\\DataCollector\\PwaCollector\:\:getServiceWorkerFiles\(\) should return array\ but returns mixed\.$#' + identifier: return.type + count: 1 + path: src/DataCollector/PwaCollector.php + + - + message: '#^Method SpomkyLabs\\PwaBundle\\DataCollector\\PwaCollector\:\:getWorkbox\(\) should return SpomkyLabs\\PwaBundle\\Dto\\Workbox but returns mixed\.$#' + identifier: return.type + count: 1 + path: src/DataCollector/PwaCollector.php + + - + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\BackgroundSync has an uninitialized property \$forceSyncFallback\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/BackgroundSync.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\BackgroundSync has an uninitialized property \\$matchCallback\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\BackgroundSync has an uninitialized property \$matchCallback\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/BackgroundSync.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\BackgroundSync has an uninitialized property \\$maxRetentionTime\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\BackgroundSync has an uninitialized property \$maxRetentionTime\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/BackgroundSync.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\BackgroundSync has an uninitialized property \\$method\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\BackgroundSync has an uninitialized property \$method\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/BackgroundSync.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\BackgroundSync has an uninitialized property \\$queueName\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\BackgroundSync has an uninitialized property \$queueName\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/BackgroundSync.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Favicons has an uninitialized property \\$src\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Favicons has an uninitialized property \$src\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Favicons.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\File has an uninitialized property \\$accept\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\File has an uninitialized property \$accept\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/File.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\File has an uninitialized property \\$name\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\File has an uninitialized property \$name\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/File.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\FileHandler has an uninitialized property \\$accept\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\FileHandler has an uninitialized property \$accept\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/FileHandler.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\FileHandler has an uninitialized property \\$action\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\FileHandler has an uninitialized property \$action\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/FileHandler.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\GoogleFontCache has an uninitialized property \\$enabled\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\GoogleFontCache has an uninitialized property \$enabled\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/GoogleFontCache.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Icon has an uninitialized property \\$sizeList\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Icon has an uninitialized property \$sizeList\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Icon.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Icon has an uninitialized property \\$src\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Icon has an uninitialized property \$src\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Icon.php - - message: "#^Property SpomkyLabs\\\\PwaBundle\\\\Dto\\\\LaunchHandler\\:\\:\\$clientMode type has no value type specified in iterable type array\\.$#" + message: '#^Property SpomkyLabs\\PwaBundle\\Dto\\LaunchHandler\:\:\$clientMode type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: src/Dto/LaunchHandler.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Manifest\\:\\:getCategories\\(\\) should return array\\ but returns array\\\\|string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Dto\\Manifest\:\:getCategories\(\) should return array\ but returns array\\|string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null\.$#' + identifier: return.type count: 1 path: src/Dto/Manifest.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Manifest\\:\\:getDescription\\(\\) should return string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null but returns array\\\\|string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Dto\\Manifest\:\:getDescription\(\) should return string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null but returns array\\|string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null\.$#' + identifier: return.type count: 1 path: src/Dto/Manifest.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Manifest\\:\\:getName\\(\\) should return string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null but returns array\\\\|string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Dto\\Manifest\:\:getName\(\) should return string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null but returns array\\|string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null\.$#' + identifier: return.type count: 1 path: src/Dto/Manifest.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Manifest\\:\\:getShortName\\(\\) should return string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null but returns array\\\\|string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Dto\\Manifest\:\:getShortName\(\) should return string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null but returns array\\|string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null\.$#' + identifier: return.type count: 1 path: src/Dto/Manifest.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Manifest\\:\\:getStartUrl\\(\\) should return string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null but returns array\\\\|string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Dto\\Manifest\:\:getStartUrl\(\) should return string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null but returns array\\|string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null\.$#' + identifier: return.type count: 1 path: src/Dto/Manifest.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\PageCache extends @final class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\ResourceCache\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\PageCache extends @final class SpomkyLabs\\PwaBundle\\Dto\\ResourceCache\.$#' + identifier: class.extendsFinalByPhpDoc count: 1 path: src/Dto/PageCache.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\ProtocolHandler has an uninitialized property \\$protocol\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\ProtocolHandler has an uninitialized property \$protocol\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/ProtocolHandler.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\ProtocolHandler has an uninitialized property \\$url\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\ProtocolHandler has an uninitialized property \$url\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/ProtocolHandler.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\RelatedApplication has an uninitialized property \\$platform\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\RelatedApplication has an uninitialized property \$platform\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/RelatedApplication.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\RelatedApplication has an uninitialized property \\$url\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\RelatedApplication has an uninitialized property \$url\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/RelatedApplication.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\ResourceCache has an uninitialized property \\$matchCallback\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\ResourceCache has an uninitialized property \$matchCallback\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/ResourceCache.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\ScopeExtension has an uninitialized property \\$origin\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\ScopeExtension has an uninitialized property \$origin\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/ScopeExtension.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Screenshot has an uninitialized property \\$src\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Screenshot has an uninitialized property \$src\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Screenshot.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Screenshot\\:\\:getLabel\\(\\) should return string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null but returns array\\\\|string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Dto\\Screenshot\:\:getLabel\(\) should return string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null but returns array\\|string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null\.$#' + identifier: return.type count: 1 path: src/Dto/Screenshot.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\ServiceWorker has an uninitialized property \\$dest\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\ServiceWorker has an uninitialized property \$dest\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/ServiceWorker.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\ServiceWorker has an uninitialized property \\$enabled\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\ServiceWorker has an uninitialized property \$enabled\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/ServiceWorker.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\ServiceWorker has an uninitialized property \\$workbox\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\ServiceWorker has an uninitialized property \$workbox\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/ServiceWorker.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\ShareTarget has an uninitialized property \\$action\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\ShareTarget has an uninitialized property \$action\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/ShareTarget.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Dto\\\\ShareTargetParameters\\:\\:getText\\(\\) should return string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null but returns array\\\\|string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Dto\\ShareTargetParameters\:\:getText\(\) should return string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null but returns array\\|string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null\.$#' + identifier: return.type count: 1 path: src/Dto/ShareTargetParameters.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Dto\\\\ShareTargetParameters\\:\\:getTitle\\(\\) should return string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null but returns array\\\\|string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Dto\\ShareTargetParameters\:\:getTitle\(\) should return string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null but returns array\\|string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null\.$#' + identifier: return.type count: 1 path: src/Dto/ShareTargetParameters.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Shortcut has an uninitialized property \\$name\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Shortcut has an uninitialized property \$name\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Shortcut.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Shortcut has an uninitialized property \\$url\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Shortcut has an uninitialized property \$url\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Shortcut.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Shortcut\\:\\:getDescription\\(\\) should return string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null but returns array\\\\|string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Dto\\Shortcut\:\:getDescription\(\) should return string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null but returns array\\|string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null\.$#' + identifier: return.type count: 1 path: src/Dto/Shortcut.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Shortcut\\:\\:getName\\(\\) should return string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface but returns array\\\\|string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Dto\\Shortcut\:\:getName\(\) should return string\|Symfony\\Contracts\\Translation\\TranslatableInterface but returns array\\|string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null\.$#' + identifier: return.type count: 1 path: src/Dto/Shortcut.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Shortcut\\:\\:getShortName\\(\\) should return string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null but returns array\\\\|string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Dto\\Shortcut\:\:getShortName\(\) should return string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null but returns array\\|string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null\.$#' + identifier: return.type count: 1 path: src/Dto/Shortcut.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Url has an uninitialized property \\$path\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Url has an uninitialized property \$path\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Url.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Widget has an uninitialized property \\$adaptativeCardTemplate\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Widget has an uninitialized property \$adaptativeCardTemplate\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Widget.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Widget has an uninitialized property \\$name\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Widget has an uninitialized property \$name\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Widget.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Widget\\:\\:getDescription\\(\\) should return string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null but returns array\\\\|string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Dto\\Widget\:\:getDescription\(\) should return string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null but returns array\\|string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null\.$#' + identifier: return.type count: 1 path: src/Dto/Widget.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Widget\\:\\:getName\\(\\) should return string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface but returns array\\\\|string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Dto\\Widget\:\:getName\(\) should return string\|Symfony\\Contracts\\Translation\\TranslatableInterface but returns array\\|string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null\.$#' + identifier: return.type count: 1 path: src/Dto/Widget.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Widget\\:\\:getShortName\\(\\) should return string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null but returns array\\\\|string\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatableInterface\\|null\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Dto\\Widget\:\:getShortName\(\) should return string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null but returns array\\|string\|Symfony\\Contracts\\Translation\\TranslatableInterface\|null\.$#' + identifier: return.type count: 1 path: src/Dto/Widget.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Workbox has an uninitialized property \\$assetCache\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Workbox has an uninitialized property \$assetCache\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Workbox.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Workbox has an uninitialized property \\$cacheManifest\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Workbox has an uninitialized property \$cacheManifest\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Workbox.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Workbox has an uninitialized property \\$enabled\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Workbox has an uninitialized property \$enabled\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Workbox.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Workbox has an uninitialized property \\$fontCache\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Workbox has an uninitialized property \$fontCache\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Workbox.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Workbox has an uninitialized property \\$googleFontCache\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Workbox has an uninitialized property \$googleFontCache\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Workbox.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Workbox has an uninitialized property \\$imageCache\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Workbox has an uninitialized property \$imageCache\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Workbox.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Workbox has an uninitialized property \\$offlineFallback\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Workbox has an uninitialized property \$offlineFallback\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Workbox.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Workbox has an uninitialized property \\$resourceCaches\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Workbox has an uninitialized property \$resourceCaches\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Workbox.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Workbox has an uninitialized property \\$useCDN\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Workbox has an uninitialized property \$useCDN\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Workbox.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Workbox has an uninitialized property \\$version\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Workbox has an uninitialized property \$version\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Workbox.php - - message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\Workbox has an uninitialized property \\$workboxPublicUrl\\. Give it default value or assign it in the constructor\\.$#" + message: '#^Class SpomkyLabs\\PwaBundle\\Dto\\Workbox has an uninitialized property \$workboxPublicUrl\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized count: 1 path: src/Dto/Workbox.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\ImageProcessor\\\\GDImageProcessor\\:\\:process\\(\\) should return string but returns string\\|false\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\ImageProcessor\\GDImageProcessor\:\:process\(\) should return string but returns string\|false\.$#' + identifier: return.type count: 1 path: src/ImageProcessor/GDImageProcessor.php - - message: "#^Parameter \\#2 \\$red of function imagecolorallocate expects int\\<0, 255\\>, int given\\.$#" + message: '#^Parameter \#1 \$width of function imagecreatetruecolor expects int\<1, max\>, int given\.$#' + identifier: argument.type + count: 2 + path: src/ImageProcessor/GDImageProcessor.php + + - + message: '#^Parameter \#2 \$height of function imagecreatetruecolor expects int\<1, max\>, int given\.$#' + identifier: argument.type + count: 2 + path: src/ImageProcessor/GDImageProcessor.php + + - + message: '#^Parameter \#2 \$red of function imagecolorallocate expects int\<0, 255\>, int given\.$#' + identifier: argument.type count: 1 path: src/ImageProcessor/GDImageProcessor.php - - message: "#^Parameter \\#3 \\$green of function imagecolorallocate expects int\\<0, 255\\>, int given\\.$#" + message: '#^Parameter \#3 \$green of function imagecolorallocate expects int\<0, 255\>, int given\.$#' + identifier: argument.type count: 1 path: src/ImageProcessor/GDImageProcessor.php - - message: "#^Parameter \\#4 \\$blue of function imagecolorallocate expects int\\<0, 255\\>, int given\\.$#" + message: '#^Parameter \#4 \$blue of function imagecolorallocate expects int\<0, 255\>, int given\.$#' + identifier: argument.type count: 1 path: src/ImageProcessor/GDImageProcessor.php - - message: "#^Should not use node with type \"Stmt_Echo\", please change the code\\.$#" + message: '#^Should not use node with type "Stmt_Echo", please change the code\.$#' + identifier: ekinoBannedCode.expression count: 3 path: src/ImageProcessor/GDImageProcessor.php - - message: "#^PHPDoc tag @return with type array\\ is incompatible with native type string\\.$#" + message: '#^PHPDoc tag @return with type array\ is incompatible with native type string\.$#' + identifier: return.phpDocType count: 1 path: src/Normalizer/AssetNormalizer.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Normalizer\\\\IconNormalizer\\:\\:normalize\\(\\) should return array\\{src\\: string, sizes\\?\\: string, type\\?\\: string, purpose\\?\\: string\\} but returns array\\\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Normalizer\\IconNormalizer\:\:normalize\(\) should return array\{src\: string, sizes\?\: string, type\?\: string, purpose\?\: string\} but returns array\\.$#' + identifier: return.type count: 1 path: src/Normalizer/IconNormalizer.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Normalizer\\\\ScreenshotNormalizer\\:\\:normalize\\(\\) should return array\\{src\\: string, sizes\\?\\: string, form_factor\\?\\: string, label\\?\\: string, platform\\?\\: string, format\\?\\: string\\} but returns array\\\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Normalizer\\ScreenshotNormalizer\:\:normalize\(\) should return array\{src\: string, sizes\?\: string, form_factor\?\: string, label\?\: string, platform\?\: string, format\?\: string\} but returns array\\.$#' + identifier: return.type count: 1 path: src/Normalizer/ScreenshotNormalizer.php - - message: "#^Parameter \\#1 \\$image of method SpomkyLabs\\\\PwaBundle\\\\ImageProcessor\\\\ImageProcessorInterface\\:\\:getSizes\\(\\) expects string, string\\|false given\\.$#" + message: '#^Parameter \#1 \$image of method SpomkyLabs\\PwaBundle\\ImageProcessor\\ImageProcessorInterface\:\:getSizes\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 1 path: src/Normalizer/ScreenshotNormalizer.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Normalizer\\\\ServiceWorkerNormalizer\\:\\:normalize\\(\\) should return array\\{scope\\?\\: string, src\\: string, use_cache\\?\\: bool\\} but returns array\\\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Normalizer\\ServiceWorkerNormalizer\:\:normalize\(\) should return array\{scope\?\: string, src\: string, use_cache\?\: bool\} but returns array\\.$#' + identifier: return.type count: 1 path: src/Normalizer/ServiceWorkerNormalizer.php - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + message: '#^Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition\:\:children\(\)\.$#' + identifier: method.notFound + count: 1 + path: src/Resources/config/definition/favicons.php + + - + message: '#^Cannot call method arrayNode\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/favicons.php + + - + message: '#^Cannot call method booleanNode\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/Resources/config/definition/favicons.php + + - + message: '#^Cannot call method canBeEnabled\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/favicons.php + + - + message: '#^Cannot call method children\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/favicons.php + + - + message: '#^Cannot call method defaultFalse\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/favicons.php + + - + message: '#^Cannot call method defaultNull\(\) on mixed\.$#' + identifier: method.nonObject + count: 6 + path: src/Resources/config/definition/favicons.php + + - + message: '#^Cannot call method defaultValue\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/favicons.php + + - + message: '#^Cannot call method end\(\) on mixed\.$#' + identifier: method.nonObject + count: 13 + path: src/Resources/config/definition/favicons.php + + - + message: '#^Cannot call method example\(\) on mixed\.$#' + identifier: method.nonObject + count: 3 + path: src/Resources/config/definition/favicons.php + + - + message: '#^Cannot call method info\(\) on mixed\.$#' + identifier: method.nonObject + count: 9 + path: src/Resources/config/definition/favicons.php + + - + message: '#^Cannot call method integerNode\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/Resources/config/definition/favicons.php + + - + message: '#^Cannot call method isRequired\(\) on mixed\.$#' + identifier: method.nonObject count: 1 path: src/Resources/config/definition/favicons.php - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + message: '#^Cannot call method max\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/Resources/config/definition/favicons.php + + - + message: '#^Cannot call method min\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/Resources/config/definition/favicons.php + + - + message: '#^Cannot call method scalarNode\(\) on mixed\.$#' + identifier: method.nonObject + count: 5 + path: src/Resources/config/definition/favicons.php + + - + message: '#^Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition\:\:children\(\)\.$#' + identifier: method.notFound + count: 1 + path: src/Resources/config/definition/image_processor.php + + - + message: '#^Cannot call method defaultNull\(\) on mixed\.$#' + identifier: method.nonObject count: 1 path: src/Resources/config/definition/image_processor.php - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + message: '#^Cannot call method end\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/Resources/config/definition/image_processor.php + + - + message: '#^Cannot call method example\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/image_processor.php + + - + message: '#^Cannot call method info\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/image_processor.php + + - + message: '#^Cannot call method scalarNode\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/image_processor.php + + - + message: '#^Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition\:\:children\(\)\.$#' + identifier: method.notFound + count: 1 + path: src/Resources/config/definition/logging.php + + - + message: '#^Cannot call method defaultNull\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/logging.php + + - + message: '#^Cannot call method end\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/Resources/config/definition/logging.php + + - + message: '#^Cannot call method info\(\) on mixed\.$#' + identifier: method.nonObject count: 1 path: src/Resources/config/definition/logging.php - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + message: '#^Cannot call method scalarNode\(\) on mixed\.$#' + identifier: method.nonObject count: 1 + path: src/Resources/config/definition/logging.php + + - + message: '#^Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition\:\:children\(\)\.$#' + identifier: method.notFound + count: 1 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Cannot call method append\(\) on mixed\.$#' + identifier: method.nonObject + count: 9 path: src/Resources/config/definition/manifest.php - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + message: '#^Cannot call method arrayNode\(\) on mixed\.$#' + identifier: method.nonObject + count: 5 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Cannot call method arrayPrototype\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Cannot call method booleanNode\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Cannot call method canBeEnabled\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Cannot call method cannotBeEmpty\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Cannot call method children\(\) on mixed\.$#' + identifier: method.nonObject + count: 3 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Cannot call method defaultTrue\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Cannot call method defaultValue\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Cannot call method end\(\) on mixed\.$#' + identifier: method.nonObject + count: 32 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Cannot call method example\(\) on mixed\.$#' + identifier: method.nonObject + count: 18 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Cannot call method info\(\) on mixed\.$#' + identifier: method.nonObject + count: 24 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Cannot call method integerNode\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Cannot call method isRequired\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Cannot call method scalarNode\(\) on mixed\.$#' + identifier: method.nonObject + count: 17 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Cannot call method scalarPrototype\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/Resources/config/definition/manifest.php + + - + message: '#^Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition\:\:children\(\)\.$#' + identifier: method.notFound + count: 1 + path: src/Resources/config/definition/path_type_reference.php + + - + message: '#^Cannot call method defaultValue\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/path_type_reference.php + + - + message: '#^Cannot call method end\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/Resources/config/definition/path_type_reference.php + + - + message: '#^Cannot call method example\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/path_type_reference.php + + - + message: '#^Cannot call method ifNotInArray\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/path_type_reference.php + + - + message: '#^Cannot call method info\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/path_type_reference.php + + - + message: '#^Cannot call method integerNode\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/path_type_reference.php + + - + message: '#^Cannot call method setDeprecated\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/path_type_reference.php + + - + message: '#^Cannot call method thenInvalid\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/path_type_reference.php + + - + message: '#^Cannot call method validate\(\) on mixed\.$#' + identifier: method.nonObject count: 1 path: src/Resources/config/definition/path_type_reference.php - - message: "#^Anonymous function should return array but returns mixed\\.$#" + message: '#^Anonymous function should return array but returns mixed\.$#' + identifier: return.type count: 8 path: src/Resources/config/definition/service_worker.php - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + message: '#^Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition\:\:children\(\)\.$#' + identifier: method.notFound count: 1 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access an offset on mixed\\.$#" + message: '#^Cannot access an offset on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'asset_cache' on mixed\\.$#" + message: '#^Cannot access offset ''asset_cache'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'asset_cache_name' on mixed\\.$#" + message: '#^Cannot access offset ''asset_cache_name'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'font_cache' on mixed\\.$#" + message: '#^Cannot access offset ''font_cache'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'font_cache_name' on mixed\\.$#" + message: '#^Cannot access offset ''font_cache_name'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'font_regex' on mixed\\.$#" + message: '#^Cannot access offset ''font_regex'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'image_cache' on mixed\\.$#" + message: '#^Cannot access offset ''image_cache'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'image_cache_name' on mixed\\.$#" + message: '#^Cannot access offset ''image_cache_name'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'image_regex' on mixed\\.$#" + message: '#^Cannot access offset ''image_regex'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'max_font_age' on mixed\\.$#" + message: '#^Cannot access offset ''max_font_age'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'max_font_cache…' on mixed\\.$#" + message: '#^Cannot access offset ''max_font_cache_entries'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'max_image_age' on mixed\\.$#" + message: '#^Cannot access offset ''max_image_age'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'max_image_cache…' on mixed\\.$#" + message: '#^Cannot access offset ''max_image_cache_entries'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'network_timeout…' on mixed\\.$#" + message: '#^Cannot access offset ''network_timeout_seconds'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'page_cache_name' on mixed\\.$#" + message: '#^Cannot access offset ''page_cache_name'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'resource_caches' on mixed\\.$#" + message: '#^Cannot access offset ''resource_caches'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'static_regex' on mixed\\.$#" + message: '#^Cannot access offset ''static_regex'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/Resources/config/definition/service_worker.php - - message: "#^Cannot access offset 'warm_cache_urls' on mixed\\.$#" + message: '#^Cannot access offset ''warm_cache_urls'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/Resources/config/definition/service_worker.php - - message: "#^Strict comparison using \\!\\=\\= between mixed and null will always evaluate to true\\.$#" + message: '#^Cannot call method append\(\) on mixed\.$#' + identifier: method.nonObject + count: 6 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method arrayNode\(\) on mixed\.$#' + identifier: method.nonObject + count: 16 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method arrayPrototype\(\) on mixed\.$#' + identifier: method.nonObject + count: 4 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method beforeNormalization\(\) on mixed\.$#' + identifier: method.nonObject + count: 7 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method booleanNode\(\) on mixed\.$#' + identifier: method.nonObject + count: 8 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method canBeDisabled\(\) on mixed\.$#' + identifier: method.nonObject + count: 5 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method canBeEnabled\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method cannotBeEmpty\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method children\(\) on mixed\.$#' + identifier: method.nonObject + count: 11 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method defaultFalse\(\) on mixed\.$#' + identifier: method.nonObject + count: 5 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method defaultNull\(\) on mixed\.$#' + identifier: method.nonObject + count: 6 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method defaultTrue\(\) on mixed\.$#' + identifier: method.nonObject count: 3 path: src/Resources/config/definition/service_worker.php - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + message: '#^Cannot call method defaultValue\(\) on mixed\.$#' + identifier: method.nonObject + count: 36 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method end\(\) on mixed\.$#' + identifier: method.nonObject + count: 102 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method example\(\) on mixed\.$#' + identifier: method.nonObject + count: 33 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method ifNotInArray\(\) on mixed\.$#' + identifier: method.nonObject count: 1 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method ifString\(\) on mixed\.$#' + identifier: method.nonObject + count: 3 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method ifTrue\(\) on mixed\.$#' + identifier: method.nonObject + count: 4 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method info\(\) on mixed\.$#' + identifier: method.nonObject + count: 64 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method integerNode\(\) on mixed\.$#' + identifier: method.nonObject + count: 11 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method integerPrototype\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method isRequired\(\) on mixed\.$#' + identifier: method.nonObject + count: 5 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method prototype\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method scalarNode\(\) on mixed\.$#' + identifier: method.nonObject + count: 37 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method scalarPrototype\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method setDeprecated\(\) on mixed\.$#' + identifier: method.nonObject + count: 17 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method then\(\) on mixed\.$#' + identifier: method.nonObject + count: 7 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method thenInvalid\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method treatFalseLike\(\) on mixed\.$#' + identifier: method.nonObject + count: 10 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method treatNullLike\(\) on mixed\.$#' + identifier: method.nonObject + count: 10 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method treatTrueLike\(\) on mixed\.$#' + identifier: method.nonObject + count: 10 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Cannot call method validate\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Strict comparison using \!\=\= between mixed and null will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 3 + path: src/Resources/config/definition/service_worker.php + + - + message: '#^Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition\:\:children\(\)\.$#' + identifier: method.notFound + count: 1 + path: src/Resources/config/definition/web_client.php + + - + message: '#^Cannot call method defaultNull\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/Resources/config/definition/web_client.php + + - + message: '#^Cannot call method end\(\) on mixed\.$#' + identifier: method.nonObject + count: 3 + path: src/Resources/config/definition/web_client.php + + - + message: '#^Cannot call method info\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/Resources/config/definition/web_client.php + + - + message: '#^Cannot call method scalarNode\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 path: src/Resources/config/definition/web_client.php - - message: "#^Cannot call method process\\(\\) on SpomkyLabs\\\\PwaBundle\\\\ImageProcessor\\\\ImageProcessorInterface\\|null\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Service\\Data\:\:getData\(\) should return string but returns mixed\.$#' + identifier: return.type + count: 1 + path: src/Service/Data.php + + - + message: '#^Property SpomkyLabs\\PwaBundle\\Service\\Data\:\:\$data \(Closure\|string\) does not accept mixed\.$#' + identifier: assign.propertyType + count: 1 + path: src/Service/Data.php + + - + message: '#^Cannot call method process\(\) on SpomkyLabs\\PwaBundle\\ImageProcessor\\ImageProcessorInterface\|null\.$#' + identifier: method.nonObject count: 1 path: src/Service/FaviconsCompiler.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\Service\\\\FaviconsCompiler\\:\\:getFavicon\\(\\) should return array\\{string, string\\} but returns array\\{string\\|false, string\\}\\.$#" + message: '#^Method SpomkyLabs\\PwaBundle\\Service\\FaviconsCompiler\:\:getFavicon\(\) should return array\{string, string\} but returns array\{string\|false, string\}\.$#' + identifier: return.type count: 1 path: src/Service/FaviconsCompiler.php - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" + message: '#^Parameter \#2 \.\.\.\$values of function sprintf expects bool\|float\|int\|string\|null, mixed given\.$#' + identifier: argument.type count: 1 path: src/ServiceWorkerRule/AppendCacheStrategies.php - - message: "#^Strict comparison using \\=\\=\\= between int\\<1, max\\> and 0 will always evaluate to false\\.$#" + message: '#^Strict comparison using \=\=\= between int\<1, max\> and 0 will always evaluate to false\.$#' + identifier: identical.alwaysFalse count: 1 path: src/ServiceWorkerRule/OfflineFallback.php - - message: "#^Method SpomkyLabs\\\\PwaBundle\\\\SpomkyLabsPwaBundle\\:\\:loadExtension\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + message: '#^Cannot access offset ''dest'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/SpomkyLabsPwaBundle.php + + - + message: '#^Cannot access offset ''enabled'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 4 + path: src/SpomkyLabsPwaBundle.php + + - + message: '#^Cannot access offset ''public_url'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 + path: src/SpomkyLabsPwaBundle.php + + - + message: '#^Cannot access offset ''serviceworker'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/SpomkyLabsPwaBundle.php + + - + message: '#^Method SpomkyLabs\\PwaBundle\\SpomkyLabsPwaBundle\:\:loadExtension\(\) has parameter \$config with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/SpomkyLabsPwaBundle.php + + - + message: '#^Parameter \#2 \$id of method Symfony\\Component\\DependencyInjection\\ContainerBuilder\:\:setAlias\(\) expects string\|Symfony\\Component\\DependencyInjection\\Alias, mixed given\.$#' + identifier: argument.type + count: 3 + path: src/SpomkyLabsPwaBundle.php + + - + message: '#^Parameter \#2 \$value of method Symfony\\Component\\DependencyInjection\\Container\:\:setParameter\(\) expects array\|bool\|float\|int\|string\|UnitEnum\|null, mixed given\.$#' + identifier: argument.type + count: 8 path: src/SpomkyLabsPwaBundle.php \ No newline at end of file diff --git a/phpstan.neon b/phpstan.neon index d550a2c..094aebc 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,14 +1,16 @@ parameters: - level: max - paths: - - src - - tests - checkMissingIterableValueType: true - checkGenericClassInNonGenericObjectType: true - checkUninitializedProperties: true - treatPhpDocTypesAsCertain: false - scanFiles: - - vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php + level: max + paths: + - src + - tests + + banned_code: + non_ignorable: false + checkUninitializedProperties: true + treatPhpDocTypesAsCertain: false + scanFiles: + - vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php + includes: - - vendor/phpstan/phpstan/conf/bleedingEdge.neon - - phpstan-baseline.neon + - vendor/phpstan/phpstan/conf/bleedingEdge.neon + - phpstan-baseline.neon diff --git a/src/CachingStrategy/AssetCache.php b/src/CachingStrategy/AssetCache.php index 5d3d576..a68e44a 100644 --- a/src/CachingStrategy/AssetCache.php +++ b/src/CachingStrategy/AssetCache.php @@ -16,6 +16,7 @@ use Symfony\Component\Serializer\Encoder\JsonEncode; use Symfony\Component\Serializer\SerializerInterface; use function count; +use function sprintf; use const JSON_PRETTY_PRINT; use const JSON_THROW_ON_ERROR; use const JSON_UNESCAPED_SLASHES; diff --git a/src/CachingStrategy/ImageCache.php b/src/CachingStrategy/ImageCache.php index daaeffe..506add9 100644 --- a/src/CachingStrategy/ImageCache.php +++ b/src/CachingStrategy/ImageCache.php @@ -11,6 +11,7 @@ use SpomkyLabs\PwaBundle\Service\CanLogInterface; use Symfony\Component\AssetMapper\Path\PublicAssetsPathResolverInterface; use Symfony\Component\DependencyInjection\Attribute\Autowire; +use function sprintf; final class ImageCache implements HasCacheStrategiesInterface, CanLogInterface { diff --git a/src/CachingStrategy/ManifestCache.php b/src/CachingStrategy/ManifestCache.php index 2447720..416626b 100644 --- a/src/CachingStrategy/ManifestCache.php +++ b/src/CachingStrategy/ManifestCache.php @@ -10,6 +10,7 @@ use SpomkyLabs\PwaBundle\Dto\Workbox; use SpomkyLabs\PwaBundle\Service\CanLogInterface; use Symfony\Component\DependencyInjection\Attribute\Autowire; +use function sprintf; final class ManifestCache implements HasCacheStrategiesInterface, CanLogInterface { diff --git a/src/CachingStrategy/PreloadUrlsGeneratorManager.php b/src/CachingStrategy/PreloadUrlsGeneratorManager.php index 1842277..db3dbd0 100644 --- a/src/CachingStrategy/PreloadUrlsGeneratorManager.php +++ b/src/CachingStrategy/PreloadUrlsGeneratorManager.php @@ -10,6 +10,7 @@ use SpomkyLabs\PwaBundle\Service\CanLogInterface; use Symfony\Component\DependencyInjection\Attribute\AutowireIterator; use function array_key_exists; +use function sprintf; final class PreloadUrlsGeneratorManager implements CanLogInterface { diff --git a/src/CachingStrategy/ResourceCaches.php b/src/CachingStrategy/ResourceCaches.php index 9a88fb5..33cb29d 100644 --- a/src/CachingStrategy/ResourceCaches.php +++ b/src/CachingStrategy/ResourceCaches.php @@ -20,6 +20,7 @@ use Symfony\Component\Serializer\Encoder\JsonEncode; use Symfony\Component\Serializer\SerializerInterface; use function count; +use function sprintf; use const JSON_PRETTY_PRINT; use const JSON_THROW_ON_ERROR; use const JSON_UNESCAPED_SLASHES; diff --git a/src/CachingStrategy/WorkboxCacheStrategy.php b/src/CachingStrategy/WorkboxCacheStrategy.php index 73076ec..21086f6 100644 --- a/src/CachingStrategy/WorkboxCacheStrategy.php +++ b/src/CachingStrategy/WorkboxCacheStrategy.php @@ -6,6 +6,7 @@ use SpomkyLabs\PwaBundle\WorkboxPlugin\CachePluginInterface; use function in_array; +use function sprintf; use const JSON_PRETTY_PRINT; use const JSON_THROW_ON_ERROR; use const JSON_UNESCAPED_SLASHES; diff --git a/src/Command/CreateIconsCommand.php b/src/Command/CreateIconsCommand.php index 87e9b81..9b3d100 100644 --- a/src/Command/CreateIconsCommand.php +++ b/src/Command/CreateIconsCommand.php @@ -19,6 +19,7 @@ use Symfony\Component\Mime\MimeTypes; use Symfony\Component\Yaml\Yaml; use function is_string; +use function sprintf; #[AsCommand(name: 'pwa:create:icons', description: 'Generate icons for your PWA')] final class CreateIconsCommand extends Command diff --git a/src/Command/CreateScreenshotCommand.php b/src/Command/CreateScreenshotCommand.php index bf2da79..9c98783 100644 --- a/src/Command/CreateScreenshotCommand.php +++ b/src/Command/CreateScreenshotCommand.php @@ -24,6 +24,7 @@ use function assert; use function is_int; use function is_string; +use function sprintf; #[AsCommand( name: 'pwa:create:screenshot', diff --git a/src/CompilerPass/PreloadUrlCompilerPass.php b/src/CompilerPass/PreloadUrlCompilerPass.php index 286e173..8ecbf9d 100644 --- a/src/CompilerPass/PreloadUrlCompilerPass.php +++ b/src/CompilerPass/PreloadUrlCompilerPass.php @@ -17,6 +17,7 @@ use Throwable; use function array_key_exists; use function is_string; +use function sprintf; /** * @internal diff --git a/src/DataCollector/PwaCollector.php b/src/DataCollector/PwaCollector.php index 7efa1e9..951b32f 100644 --- a/src/DataCollector/PwaCollector.php +++ b/src/DataCollector/PwaCollector.php @@ -48,7 +48,7 @@ public function __construct( ) { } - public function collect(Request $request, Response $response, Throwable $exception = null): void + public function collect(Request $request, Response $response, ?Throwable $exception = null): void { $jsonOptions = [ AbstractObjectNormalizer::SKIP_UNINITIALIZED_VALUES => true, diff --git a/src/ImageProcessor/Configuration.php b/src/ImageProcessor/Configuration.php index e64755f..fc4df4b 100644 --- a/src/ImageProcessor/Configuration.php +++ b/src/ImageProcessor/Configuration.php @@ -6,6 +6,7 @@ use InvalidArgumentException; use Stringable; +use function sprintf; final readonly class Configuration implements Stringable { diff --git a/src/ImageProcessor/GDImageProcessor.php b/src/ImageProcessor/GDImageProcessor.php index 4153e0c..8649735 100644 --- a/src/ImageProcessor/GDImageProcessor.php +++ b/src/ImageProcessor/GDImageProcessor.php @@ -121,11 +121,10 @@ private function createMainImage(string $image, Configuration $configuration): G } /*if ($configuration->width === $configuration->height) { - $mainImage = imagescale($mainImage, $configuration->width, $configuration->height); - assert($mainImage !== false); - - return $mainImage; - }*/ + * $mainImage = imagescale($mainImage, $configuration->width, $configuration->height); + * assert($mainImage !== false); + * return $mainImage; + * }*/ $srcWidth = imagesx($mainImage); $srcHeight = imagesy($mainImage); diff --git a/src/MatchCallbackHandler/DestinationMatchCallbackHandler.php b/src/MatchCallbackHandler/DestinationMatchCallbackHandler.php index ba4ff12..d99250c 100644 --- a/src/MatchCallbackHandler/DestinationMatchCallbackHandler.php +++ b/src/MatchCallbackHandler/DestinationMatchCallbackHandler.php @@ -7,6 +7,7 @@ use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; use SpomkyLabs\PwaBundle\Service\CanLogInterface; +use function sprintf; final class DestinationMatchCallbackHandler implements MatchCallbackHandlerInterface, CanLogInterface { diff --git a/src/MatchCallbackHandler/ExactPathnameMatchCallbackHandler.php b/src/MatchCallbackHandler/ExactPathnameMatchCallbackHandler.php index 050177a..a295b33 100644 --- a/src/MatchCallbackHandler/ExactPathnameMatchCallbackHandler.php +++ b/src/MatchCallbackHandler/ExactPathnameMatchCallbackHandler.php @@ -7,6 +7,7 @@ use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; use SpomkyLabs\PwaBundle\Service\CanLogInterface; +use function sprintf; final class ExactPathnameMatchCallbackHandler implements MatchCallbackHandlerInterface, CanLogInterface { diff --git a/src/MatchCallbackHandler/OriginMatchCallbackHandler.php b/src/MatchCallbackHandler/OriginMatchCallbackHandler.php index 7d0eb7a..f34f943 100644 --- a/src/MatchCallbackHandler/OriginMatchCallbackHandler.php +++ b/src/MatchCallbackHandler/OriginMatchCallbackHandler.php @@ -7,6 +7,7 @@ use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; use SpomkyLabs\PwaBundle\Service\CanLogInterface; +use function sprintf; final class OriginMatchCallbackHandler implements MatchCallbackHandlerInterface, CanLogInterface { diff --git a/src/MatchCallbackHandler/PathnameEndsWithMatchCallbackHandler.php b/src/MatchCallbackHandler/PathnameEndsWithMatchCallbackHandler.php index f134627..71ed16c 100644 --- a/src/MatchCallbackHandler/PathnameEndsWithMatchCallbackHandler.php +++ b/src/MatchCallbackHandler/PathnameEndsWithMatchCallbackHandler.php @@ -7,6 +7,7 @@ use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; use SpomkyLabs\PwaBundle\Service\CanLogInterface; +use function sprintf; final class PathnameEndsWithMatchCallbackHandler implements MatchCallbackHandlerInterface, CanLogInterface { diff --git a/src/MatchCallbackHandler/PathnameStartsWithMatchCallbackHandler.php b/src/MatchCallbackHandler/PathnameStartsWithMatchCallbackHandler.php index b643f86..d0ed63b 100644 --- a/src/MatchCallbackHandler/PathnameStartsWithMatchCallbackHandler.php +++ b/src/MatchCallbackHandler/PathnameStartsWithMatchCallbackHandler.php @@ -7,6 +7,7 @@ use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; use SpomkyLabs\PwaBundle\Service\CanLogInterface; +use function sprintf; final class PathnameStartsWithMatchCallbackHandler implements MatchCallbackHandlerInterface, CanLogInterface { diff --git a/src/MatchCallbackHandler/RouteMatchCallbackHandler.php b/src/MatchCallbackHandler/RouteMatchCallbackHandler.php index 2494790..bfc51cf 100644 --- a/src/MatchCallbackHandler/RouteMatchCallbackHandler.php +++ b/src/MatchCallbackHandler/RouteMatchCallbackHandler.php @@ -8,6 +8,7 @@ use Psr\Log\NullLogger; use SpomkyLabs\PwaBundle\Service\CanLogInterface; use Symfony\Component\Routing\RouterInterface; +use function sprintf; final class RouteMatchCallbackHandler implements MatchCallbackHandlerInterface, CanLogInterface { diff --git a/src/Normalizer/AssetNormalizer.php b/src/Normalizer/AssetNormalizer.php index 5521de7..dc40999 100644 --- a/src/Normalizer/AssetNormalizer.php +++ b/src/Normalizer/AssetNormalizer.php @@ -21,29 +21,29 @@ public function __construct( /** * @return array{src: string, sizes?: string, form_factor?: string, label?: string, platform?: string, format?: string} */ - public function normalize(mixed $object, string $format = null, array $context = []): string + public function normalize(mixed $data, ?string $format = null, array $context = []): string { - assert($object instanceof Asset); + assert($data instanceof Asset); $url = null; - if (! str_starts_with($object->src, '/')) { - $asset = $this->assetMapper->getAsset($object->src); + if (! str_starts_with($data->src, '/')) { + $asset = $this->assetMapper->getAsset($data->src); $url = $asset?->publicPath; } if ($url === null) { - $url = $object->src; + $url = $data->src; } return $url; } - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { assert(is_string($data)); return Asset::create($data); } - public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool { return $data instanceof Asset; } @@ -51,7 +51,7 @@ public function supportsNormalization(mixed $data, string $format = null, array public function supportsDenormalization( mixed $data, string $type, - string $format = null, + ?string $format = null, array $context = [] ): bool { return $type === Asset::class; diff --git a/src/Normalizer/IconNormalizer.php b/src/Normalizer/IconNormalizer.php index 0c18982..d7d22d0 100644 --- a/src/Normalizer/IconNormalizer.php +++ b/src/Normalizer/IconNormalizer.php @@ -25,20 +25,20 @@ public function __construct( /** * @return array{src: string, sizes?: string, type?: string, purpose?: string} */ - public function normalize(mixed $object, string $format = null, array $context = []): array + public function normalize(mixed $data, ?string $format = null, array $context = []): array { - assert($object instanceof Icon); - $imageType = $object->type; - if (! str_starts_with($object->src->src, '/')) { - $asset = $this->assetMapper->getAsset($object->src->src); + assert($data instanceof Icon); + $imageType = $data->type; + if (! str_starts_with($data->src->src, '/')) { + $asset = $this->assetMapper->getAsset($data->src->src); $imageType = $this->getType($asset); } $result = [ - 'src' => $this->normalizer->normalize($object->src, $format, $context), - 'sizes' => $object->getSizeList(), + 'src' => $this->normalizer->normalize($data->src, $format, $context), + 'sizes' => $data->getSizeList(), 'type' => $imageType, - 'purpose' => $object->purpose, + 'purpose' => $data->purpose, ]; $cleanup = static fn (array $data): array => array_filter( @@ -49,7 +49,7 @@ public function normalize(mixed $object, string $format = null, array $context = return $cleanup($result); } - public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool { return $data instanceof Icon; } @@ -70,7 +70,6 @@ private function getType(?MappedAsset $asset): ?string return null; } - $mime = MimeTypes::getDefault(); - return $mime->guessMimeType($asset->sourcePath); + return MimeTypes::getDefault()->guessMimeType($asset->sourcePath); } } diff --git a/src/Normalizer/ScreenshotNormalizer.php b/src/Normalizer/ScreenshotNormalizer.php index 9efb9c1..d95dbf0 100644 --- a/src/Normalizer/ScreenshotNormalizer.php +++ b/src/Normalizer/ScreenshotNormalizer.php @@ -13,6 +13,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use function assert; +use function sprintf; final class ScreenshotNormalizer implements NormalizerInterface, NormalizerAwareInterface { @@ -27,23 +28,23 @@ public function __construct( /** * @return array{src: string, sizes?: string, form_factor?: string, label?: string, platform?: string, format?: string} */ - public function normalize(mixed $object, string $format = null, array $context = []): array + public function normalize(mixed $data, ?string $format = null, array $context = []): array { - assert($object instanceof Screenshot); + assert($data instanceof Screenshot); $asset = null; - $imageType = $object->type; - if ($imageType === null && ! str_starts_with($object->src->src, '/')) { - $asset = $this->assetMapper->getAsset($object->src->src); + $imageType = $data->type; + if ($imageType === null && ! str_starts_with($data->src->src, '/')) { + $asset = $this->assetMapper->getAsset($data->src->src); $imageType = $this->getType($asset); } - ['sizes' => $sizes, 'formFactor' => $formFactor] = $this->getSizes($object, $asset); + ['sizes' => $sizes, 'formFactor' => $formFactor] = $this->getSizes($data, $asset); $result = [ - 'src' => $this->normalizer->normalize($object->src, $format, $context), + 'src' => $this->normalizer->normalize($data->src, $format, $context), 'sizes' => $sizes, 'form_factor' => $formFactor, - 'label' => $object->label, - 'platform' => $object->platform, + 'label' => $data->label, + 'platform' => $data->platform, 'format' => $imageType, ]; @@ -54,7 +55,7 @@ public function normalize(mixed $object, string $format = null, array $context = return $cleanup($result); } - public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool { return $data instanceof Screenshot; } diff --git a/src/Normalizer/ServiceWorkerNormalizer.php b/src/Normalizer/ServiceWorkerNormalizer.php index c9d11a8..2480074 100644 --- a/src/Normalizer/ServiceWorkerNormalizer.php +++ b/src/Normalizer/ServiceWorkerNormalizer.php @@ -13,14 +13,14 @@ /** * @return array{scope?: string, src: string, use_cache?: bool} */ - public function normalize(mixed $object, string $format = null, array $context = []): array + public function normalize(mixed $data, ?string $format = null, array $context = []): array { - assert($object instanceof ServiceWorker); + assert($data instanceof ServiceWorker); $result = [ - 'src' => '/' . trim($object->dest, '/'), - 'scope' => $object->scope, - 'use_cache' => $object->useCache, + 'src' => '/' . trim($data->dest, '/'), + 'scope' => $data->scope, + 'use_cache' => $data->useCache, ]; $cleanup = static fn (array $data): array => array_filter( @@ -30,7 +30,7 @@ public function normalize(mixed $object, string $format = null, array $context = return $cleanup($result); } - public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool { return $data instanceof ServiceWorker; } diff --git a/src/Normalizer/UrlNormalizer.php b/src/Normalizer/UrlNormalizer.php index e373fef..84ebafb 100644 --- a/src/Normalizer/UrlNormalizer.php +++ b/src/Normalizer/UrlNormalizer.php @@ -24,31 +24,31 @@ public function __construct( ) { } - public function normalize(mixed $object, string $format = null, array $context = []): string + public function normalize(mixed $data, ?string $format = null, array $context = []): string { - assert($object instanceof Url); + assert($data instanceof Url); // If the path is a valid URL, we return it directly - if (str_starts_with($object->path, '/') && filter_var($object->path, FILTER_VALIDATE_URL) !== false) { - return $object->path; + if (str_starts_with($data->path, '/') && filter_var($data->path, FILTER_VALIDATE_URL) !== false) { + return $data->path; } // If the path is an asset, we return the public path - $asset = $this->assetMapper->getAsset($object->path); + $asset = $this->assetMapper->getAsset($data->path); if ($asset !== null) { return $asset->publicPath; } // Otherwise, we try to generate the URL try { - return $this->router->generate($object->path, $object->params, $object->pathTypeReference); + return $this->router->generate($data->path, $data->params, $data->pathTypeReference); } catch (Throwable) { // If the URL cannot be generated, we return the path as is - return $object->path; + return $data->path; } } - public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool { return $data instanceof Url; } diff --git a/src/Service/FaviconsCompiler.php b/src/Service/FaviconsCompiler.php index 6c2dbbb..1d77317 100644 --- a/src/Service/FaviconsCompiler.php +++ b/src/Service/FaviconsCompiler.php @@ -15,6 +15,7 @@ use Symfony\Component\Process\Exception\ProcessFailedException; use Symfony\Component\Process\Process; use function assert; +use function sprintf; use const PHP_EOL; final class FaviconsCompiler implements FileCompilerInterface, CanLogInterface diff --git a/src/Service/ServiceWorkerCompiler.php b/src/Service/ServiceWorkerCompiler.php index 9165214..ef49142 100644 --- a/src/Service/ServiceWorkerCompiler.php +++ b/src/Service/ServiceWorkerCompiler.php @@ -17,6 +17,7 @@ use function in_array; use function is_array; use function is_string; +use function sprintf; final class ServiceWorkerCompiler implements FileCompilerInterface, CanLogInterface { diff --git a/src/ServiceWorkerRule/AppendCacheStrategies.php b/src/ServiceWorkerRule/AppendCacheStrategies.php index b895b69..94857f5 100644 --- a/src/ServiceWorkerRule/AppendCacheStrategies.php +++ b/src/ServiceWorkerRule/AppendCacheStrategies.php @@ -7,6 +7,7 @@ use SpomkyLabs\PwaBundle\CachingStrategy\HasCacheStrategiesInterface; use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Component\DependencyInjection\Attribute\AutowireIterator; +use function sprintf; use const PHP_EOL; final readonly class AppendCacheStrategies implements ServiceWorkerRuleInterface diff --git a/src/Subscriber/PwaDevServerSubscriber.php b/src/Subscriber/PwaDevServerSubscriber.php index b1c0735..41d47e6 100644 --- a/src/Subscriber/PwaDevServerSubscriber.php +++ b/src/Subscriber/PwaDevServerSubscriber.php @@ -58,7 +58,7 @@ public function onKernelRequest(RequestEvent $event): void public function onKernelResponse(ResponseEvent $event): void { $headers = $event->getResponse() -->headers; + ->headers; if ($headers->has('X-Manifest-Dev') || $headers->has('X-SW-Dev') || $headers->has('X-Favicons-Dev')) { $event->stopPropagation(); } diff --git a/src/Twig/PwaRuntime.php b/src/Twig/PwaRuntime.php index 8b7db30..e8146e0 100644 --- a/src/Twig/PwaRuntime.php +++ b/src/Twig/PwaRuntime.php @@ -13,6 +13,7 @@ use Symfony\Component\AssetMapper\MappedAsset; use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Component\Mime\MimeTypes; +use function sprintf; use const ENT_COMPAT; use const ENT_SUBSTITUTE; use const PHP_EOL; diff --git a/src/WorkboxPlugin/BroadcastUpdatePlugin.php b/src/WorkboxPlugin/BroadcastUpdatePlugin.php index 8d5011d..33fde5a 100644 --- a/src/WorkboxPlugin/BroadcastUpdatePlugin.php +++ b/src/WorkboxPlugin/BroadcastUpdatePlugin.php @@ -4,6 +4,8 @@ namespace SpomkyLabs\PwaBundle\WorkboxPlugin; +use function sprintf; + final readonly class BroadcastUpdatePlugin implements CachePluginInterface, HasDebugInterface { private const NAME = 'BroadcastUpdatePlugin'; diff --git a/src/WorkboxPlugin/CacheableResponsePlugin.php b/src/WorkboxPlugin/CacheableResponsePlugin.php index 011d145..6cec135 100644 --- a/src/WorkboxPlugin/CacheableResponsePlugin.php +++ b/src/WorkboxPlugin/CacheableResponsePlugin.php @@ -4,6 +4,8 @@ namespace SpomkyLabs\PwaBundle\WorkboxPlugin; +use function sprintf; + final readonly class CacheableResponsePlugin implements CachePluginInterface, HasDebugInterface { private const NAME = 'CacheableResponsePlugin'; diff --git a/src/WorkboxPlugin/ExpirationPlugin.php b/src/WorkboxPlugin/ExpirationPlugin.php index 79eb733..141b913 100644 --- a/src/WorkboxPlugin/ExpirationPlugin.php +++ b/src/WorkboxPlugin/ExpirationPlugin.php @@ -4,6 +4,8 @@ namespace SpomkyLabs\PwaBundle\WorkboxPlugin; +use function sprintf; + final readonly class ExpirationPlugin implements CachePluginInterface, HasDebugInterface { private const NAME = 'ExpirationPlugin'; diff --git a/tests/Functional/AbstractPwaTestCase.php b/tests/Functional/AbstractPwaTestCase.php index 64a27b5..046c286 100644 --- a/tests/Functional/AbstractPwaTestCase.php +++ b/tests/Functional/AbstractPwaTestCase.php @@ -8,6 +8,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Filesystem\Filesystem; use function assert; +use function sprintf; /** * @internal diff --git a/tests/Functional/CompileCommandTest.php b/tests/Functional/CompileCommandTest.php index d4d3233..899d26b 100644 --- a/tests/Functional/CompileCommandTest.php +++ b/tests/Functional/CompileCommandTest.php @@ -29,22 +29,20 @@ public static function theFileAreCompiled(): void static::assertFileExists(self::$kernel->getCacheDir() . '/output/site.webmanifest'); static::assertFileExists(self::$kernel->getCacheDir() . '/output/sw.js'); static::assertFileExists( - self::$kernel->getCacheDir() . '/output/assets/pwa/screenshots/360x800-86e5e530cd7674b4f1137a418b6d0264.svg' + self::$kernel->getCacheDir() . '/output/assets/pwa/screenshots/360x800-huXlMM1.svg' ); static::assertFileExists( - self::$kernel->getCacheDir() . '/output/assets/pwa/screenshots/390x844-3f5c4bdccd303b49c95aa4344651c7e2.svg' + self::$kernel->getCacheDir() . '/output/assets/pwa/screenshots/390x844-P1xL3M0.svg' ); static::assertFileExists( - self::$kernel->getCacheDir() . '/output/assets/pwa/screenshots/600x400-a6d84c84616946feb5f92f8ca0ae4047.svg' + self::$kernel->getCacheDir() . '/output/assets/pwa/screenshots/600x400-pthMhGF.svg' ); static::assertFileExists( - self::$kernel->getCacheDir() . '/output/assets/pwa/screenshots/780x360-5bf5dc07ede9d26a9b2e9dc9f53d1959.svg' + self::$kernel->getCacheDir() . '/output/assets/pwa/screenshots/780x360-W_XcB-3.svg' ); static::assertFileExists( - self::$kernel->getCacheDir() . '/output/assets/pwa/screenshots/915x412-6141e808964c20e880f141190100d6e6.svg' - ); - static::assertFileExists( - self::$kernel->getCacheDir() . '/output/assets/pwa/1920x1920-862cb89ba358ac021badfbe32a89bbfb.svg' + self::$kernel->getCacheDir() . '/output/assets/pwa/screenshots/915x412-YUHoCJZ.svg' ); + static::assertFileExists(self::$kernel->getCacheDir() . '/output/assets/pwa/1920x1920-hiy4m6N.svg'); } } diff --git a/tests/Functional/GenerateIconsCommandTest.php b/tests/Functional/GenerateIconsCommandTest.php index 77b16c6..7e2b2ee 100644 --- a/tests/Functional/GenerateIconsCommandTest.php +++ b/tests/Functional/GenerateIconsCommandTest.php @@ -7,6 +7,7 @@ use PHPUnit\Framework\Attributes\Test; use Symfony\Component\Console\Tester\CommandTester; use function assert; +use function sprintf; /** * @internal diff --git a/tests/Functional/TakeScreenshotCommandTest.php b/tests/Functional/TakeScreenshotCommandTest.php index b8dd723..1a5d7c1 100644 --- a/tests/Functional/TakeScreenshotCommandTest.php +++ b/tests/Functional/TakeScreenshotCommandTest.php @@ -8,6 +8,7 @@ use PHPUnit\Framework\Attributes\Test; use Symfony\Component\Console\Tester\CommandTester; use function assert; +use function sprintf; /** * @internal diff --git a/tests/TestFilesystem.php b/tests/TestFilesystem.php index 002a7b5..70a7e02 100644 --- a/tests/TestFilesystem.php +++ b/tests/TestFilesystem.php @@ -7,6 +7,7 @@ use Symfony\Component\AssetMapper\Path\PublicAssetsFilesystemInterface; use Symfony\Component\DependencyInjection\Attribute\Autowire; use function dirname; +use function sprintf; final readonly class TestFilesystem implements PublicAssetsFilesystemInterface {