diff --git a/composer.json b/composer.json index aa2b7e45..ec0e6146 100644 --- a/composer.json +++ b/composer.json @@ -39,10 +39,12 @@ "psr/http-server-middleware": "^1.0" }, "require-dev": { - "blitz-php/coding-standard": "^1.3", + "blitz-php/coding-standard": "^1.3", "filp/whoops": "^2.15", "kahlan/kahlan": "^5.2", - "phpstan/phpstan": "^1.10.2" + "phpstan/extension-installer": "^1.3", + "phpstan/phpstan-strict-rules": "^1.6", + "phpstan/phpstan": "^1.11" }, "autoload": { "psr-4": { @@ -100,6 +102,9 @@ "config": { "optimize-autoloader": true, "preferred-install": "dist", - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "phpstan/extension-installer": true + } } } diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 36959fe1..cc302391 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -2,841 +2,1033 @@ $ignoreErrors = []; $ignoreErrors[] = [ + // identifier: method.notFound 'message' => '#^Call to an undefined method BlitzPHP\\\\Traits\\\\Mixins\\\\HigherOrderCollectionProxy\\:\\:__invoke\\(\\)\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Cli/Commands/Utilities/About.php', ]; $ignoreErrors[] = [ + // identifier: method.notFound 'message' => '#^Call to an undefined method Ahc\\\\Cli\\\\Output\\\\Writer\\:\\:errorBold\\(\\)\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Cli/Console/Command.php', ]; $ignoreErrors[] = [ + // identifier: method.notFound 'message' => '#^Call to an undefined method Ahc\\\\Cli\\\\Output\\\\Writer\\:\\:infoBold\\(\\)\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Cli/Console/Command.php', ]; $ignoreErrors[] = [ + // identifier: method.notFound 'message' => '#^Call to an undefined method Ahc\\\\Cli\\\\Output\\\\Writer\\:\\:okBold\\(\\)\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Cli/Console/Command.php', ]; $ignoreErrors[] = [ + // identifier: method.notFound 'message' => '#^Call to an undefined method Ahc\\\\Cli\\\\Output\\\\Writer\\:\\:warnBold\\(\\)\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Cli/Console/Command.php', ]; $ignoreErrors[] = [ + // identifier: property.notFound 'message' => '#^Access to an undefined property Ahc\\\\Cli\\\\Output\\\\Writer\\:\\:\\$bold\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Cli/Console/Console.php', ]; $ignoreErrors[] = [ + // identifier: method.notFound 'message' => '#^Call to an undefined method Ahc\\\\Cli\\\\Application\\|Ahc\\\\Cli\\\\IO\\\\Interactor\\:\\:write\\(\\)\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Cli/Console/Console.php', ]; $ignoreErrors[] = [ + // identifier: method.notFound 'message' => '#^Call to an undefined method Ahc\\\\Cli\\\\IO\\\\Interactor\\:\\:write\\(\\)\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Cli/Console/Console.php', ]; $ignoreErrors[] = [ + // identifier: staticMethod.notFound 'message' => '#^Call to an undefined static method Nette\\\\Schema\\\\Expect\\:\\:closure\\(\\)\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Constants/schemas/middlewares.config.php', ]; $ignoreErrors[] = [ + // identifier: method.templateTypeNotInParameter + 'message' => '#^Template type T of method BlitzPHP\\\\Container\\\\Container\\:\\:make\\(\\) is not referenced in a parameter\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/src/Container/Container.php', +]; +$ignoreErrors[] = [ + // identifier: property.notFound 'message' => '#^Access to an undefined property mindplay\\\\annotations\\\\IAnnotation\\:\\:\\$method\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Controllers/RestController.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to static method make\\(\\) on an unknown class Spatie\\\\Ignition\\\\Ignition\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Debug/Debugger.php', ]; $ignoreErrors[] = [ + // identifier: booleanNot.alwaysFalse 'message' => '#^Negated boolean expression is always false\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Debug/Toolbar.php', ]; $ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$result might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/src/Debug/Toolbar.php', +]; +$ignoreErrors[] = [ + // identifier: phpDoc.parseError 'message' => '#^PHPDoc tag @method has invalid value \\(static void configure\\(callable \\$callback\\(RouteBuilder \\$route\\)\\) Configure les parametres de routing\\.\\)\\: Unexpected token "\\(", expected \'\\)\' at offset 63$#', 'count' => 1, 'path' => __DIR__ . '/src/Facades/Route.php', ]; $ignoreErrors[] = [ + // identifier: return.unusedType 'message' => '#^Function img\\(\\) never returns void so it can be removed from the return type\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Helpers/assets.php', ]; $ignoreErrors[] = [ + // identifier: return.unusedType 'message' => '#^Function less_styles\\(\\) never returns void so it can be removed from the return type\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Helpers/assets.php', ]; $ignoreErrors[] = [ + // identifier: return.unusedType 'message' => '#^Function lib_scripts\\(\\) never returns void so it can be removed from the return type\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Helpers/assets.php', ]; $ignoreErrors[] = [ + // identifier: return.unusedType 'message' => '#^Function lib_styles\\(\\) never returns void so it can be removed from the return type\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Helpers/assets.php', ]; $ignoreErrors[] = [ + // identifier: return.unusedType 'message' => '#^Function scripts\\(\\) never returns void so it can be removed from the return type\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Helpers/assets.php', ]; $ignoreErrors[] = [ + // identifier: return.unusedType 'message' => '#^Function styles\\(\\) never returns void so it can be removed from the return type\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Helpers/assets.php', ]; $ignoreErrors[] = [ + // identifier: booleanNot.alwaysFalse 'message' => '#^Negated boolean expression is always false\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Helpers/assets.php', ]; $ignoreErrors[] = [ + // identifier: return.unusedType 'message' => '#^Function logger\\(\\) never returns void so it can be removed from the return type\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Helpers/common.php', ]; $ignoreErrors[] = [ + // identifier: variable.undefined + 'message' => '#^Variable \\$result might not be defined\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/src/Helpers/filesystem.php', +]; +$ignoreErrors[] = [ + // identifier: method.notFound 'message' => '#^Call to an undefined method BlitzPHP\\\\Http\\\\Request\\:\\:getFormat\\(\\)\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Http/Request.php', ]; $ignoreErrors[] = [ + // identifier: method.notFound 'message' => '#^Call to an undefined method BlitzPHP\\\\Http\\\\Request\\:\\:getMimeType\\(\\)\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Http/Request.php', ]; $ignoreErrors[] = [ + // identifier: return.type 'message' => '#^Method BlitzPHP\\\\Http\\\\Request\\:\\:validation\\(\\) should return BlitzPHP\\\\Validation\\\\Validation but returns Dimtrovich\\\\Validation\\\\Validation\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Http/Request.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Parameter \\$default of method BlitzPHP\\\\Http\\\\Request\\:\\:old\\(\\) has invalid type BlitzPHP\\\\Wolke\\\\Model\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Http/Request.php', ]; $ignoreErrors[] = [ + // identifier: notIdentical.alwaysTrue + 'message' => '#^Strict comparison using \\!\\=\\= between null and BlitzPHP\\\\Session\\\\Store will always evaluate to true\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/src/Http/Request.php', +]; +$ignoreErrors[] = [ + // identifier: method.notFound 'message' => '#^Call to an undefined method DateTimeInterface\\:\\:setTimezone\\(\\)\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Http/Response.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to constant DEBUG_SERVER on an unknown class PHPMailer\\\\PHPMailer\\\\SMTP\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$AltBody on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$Body on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$CharSet on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$DKIM_domain on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$DKIM_identity on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$DKIM_passphrase on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$DKIM_private on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$DKIM_selector on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$Debugoutput on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$From on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$Host on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$Password on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$Port on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$Priority on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$SMTPAuth on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$SMTPDebug on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$SMTPSecure on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$Subject on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$Timeout on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to property \\$Username on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addAddress\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addAttachment\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addBCC\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addCC\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addCustomHeader\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addEmbeddedImage\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addReplyTo\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addStringAttachment\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addStringEmbeddedImage\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method clearAddresses\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method clearBCCs\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method clearCCs\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method clearReplyTos\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method getLastMessageID\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method isHTML\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method isMail\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method isQmail\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method isSMTP\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method isSendmail\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method send\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method setFrom\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method sign\\(\\) on an unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Class PHPMailer\\\\PHPMailer\\\\PHPMailer not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class PHPMailer\\\\PHPMailer\\\\PHPMailer not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: throws.notThrowable 'message' => '#^PHPDoc tag @throws with type PHPMailer\\\\PHPMailer\\\\Exception is not subtype of Throwable$#', 'count' => 11, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Property BlitzPHP\\\\Mail\\\\Adapters\\\\PHPMailer\\:\\:\\$mailer has unknown class PHPMailer\\\\PHPMailer\\\\PHPMailer as its type\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/PHPMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addBcc\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addCC\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addPart\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 4, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addReplyTo\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addTo\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method asInline\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Part\\\\DataPart\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method bcc\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method cc\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method from\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method generateMessageId\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method getHeaders\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method html\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method priority\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method replyTo\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method send\\(\\) on an unknown class Symfony\\\\Component\\\\Mailer\\\\Mailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method sign\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Crypto\\\\DkimSigner\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method sign\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Crypto\\\\SMimeSigner\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method subject\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method text\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method to\\(\\) on an unknown class Symfony\\\\Component\\\\Mime\\\\Email\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to static method fromDsn\\(\\) on an unknown class Symfony\\\\Component\\\\Mailer\\\\Transport\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Class Symfony\\\\Component\\\\Mailer\\\\Mailer not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class Symfony\\\\Component\\\\Mailer\\\\Mailer not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class Symfony\\\\Component\\\\Mime\\\\Address not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class Symfony\\\\Component\\\\Mime\\\\Crypto\\\\DkimSigner not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class Symfony\\\\Component\\\\Mime\\\\Crypto\\\\SMimeSigner not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class Symfony\\\\Component\\\\Mime\\\\Email not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class Symfony\\\\Component\\\\Mime\\\\Part\\\\DataPart not found\\.$#', 'count' => 4, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class Symfony\\\\Component\\\\Mime\\\\Part\\\\File not found\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Method BlitzPHP\\\\Mail\\\\Adapters\\\\SymfonyMailer\\:\\:makeAddress\\(\\) has invalid return type Symfony\\\\Component\\\\Mime\\\\Address\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Method BlitzPHP\\\\Mail\\\\Adapters\\\\SymfonyMailer\\:\\:transporter\\(\\) has invalid return type Symfony\\\\Component\\\\Mailer\\\\Mailer\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: property.onlyWritten 'message' => '#^Property BlitzPHP\\\\Mail\\\\Adapters\\\\SymfonyMailer\\:\\:\\$encryption is never read, only written\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Property BlitzPHP\\\\Mail\\\\Adapters\\\\SymfonyMailer\\:\\:\\$mailer has unknown class Symfony\\\\Component\\\\Mime\\\\Email as its type\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: property.onlyWritten 'message' => '#^Property BlitzPHP\\\\Mail\\\\Adapters\\\\SymfonyMailer\\:\\:\\$timeout is never read, only written\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Property BlitzPHP\\\\Mail\\\\Adapters\\\\SymfonyMailer\\:\\:\\$transporter has unknown class Symfony\\\\Component\\\\Mailer\\\\Mailer as its type\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Mail/Adapters/SymfonyMailer.php', ]; $ignoreErrors[] = [ + // identifier: new.static 'message' => '#^Unsafe usage of new static\\(\\)\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Middlewares/BaseMiddleware.php', ]; $ignoreErrors[] = [ + // identifier: assign.propertyType 'message' => '#^Property BlitzPHP\\\\Router\\\\Dispatcher\\:\\:\\$request \\(BlitzPHP\\\\Http\\\\Request\\) does not accept Psr\\\\Http\\\\Message\\\\ServerRequestInterface\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/Router/Dispatcher.php', ]; $ignoreErrors[] = [ + // identifier: assign.propertyType 'message' => '#^Property BlitzPHP\\\\Router\\\\Dispatcher\\:\\:\\$response \\(BlitzPHP\\\\Http\\\\Response\\) does not accept Psr\\\\Http\\\\Message\\\\ResponseInterface\\.$#', 'count' => 4, 'path' => __DIR__ . '/src/Router/Dispatcher.php', ]; $ignoreErrors[] = [ + // identifier: function.notFound 'message' => '#^Function expect not found\\.$#', 'count' => 3, 'path' => __DIR__ . '/src/Spec/Mock/MockCache.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method directive\\(\\) on an unknown class Jenssegers\\\\Blade\\\\Blade\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/BladeAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method if\\(\\) on an unknown class Jenssegers\\\\Blade\\\\Blade\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/BladeAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method render\\(\\) on an unknown class Jenssegers\\\\Blade\\\\Blade\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/BladeAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Class Jenssegers\\\\Blade\\\\Blade not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/BladeAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class Jenssegers\\\\Blade\\\\Blade not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/BladeAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Property BlitzPHP\\\\View\\\\Adapters\\\\BladeAdapter\\:\\:\\$engine has unknown class Jenssegers\\\\Blade\\\\Blade as its type\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/BladeAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method renderToString\\(\\) on an unknown class Latte\\\\Engine\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/LatteAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method setAutoRefresh\\(\\) on an unknown class Latte\\\\Engine\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/LatteAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method setLoader\\(\\) on an unknown class Latte\\\\Engine\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/LatteAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method setTempDirectory\\(\\) on an unknown class Latte\\\\Engine\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/LatteAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Class Latte\\\\Engine not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/LatteAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class Latte\\\\Engine not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/LatteAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class Latte\\\\Loaders\\\\FileLoader not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/LatteAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Property BlitzPHP\\\\View\\\\Adapters\\\\LatteAdapter\\:\\:\\$latte has unknown class Latte\\\\Engine as its type\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/LatteAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addFolder\\(\\) on an unknown class League\\\\Plates\\\\Engine\\.$#', 'count' => 2, 'path' => __DIR__ . '/src/View/Adapters/PlatesAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method loadExtension\\(\\) on an unknown class League\\\\Plates\\\\Engine\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/PlatesAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method registerFunction\\(\\) on an unknown class League\\\\Plates\\\\Engine\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/PlatesAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method render\\(\\) on an unknown class League\\\\Plates\\\\Engine\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/PlatesAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Class League\\\\Plates\\\\Engine not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/PlatesAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class League\\\\Plates\\\\Engine not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/PlatesAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class League\\\\Plates\\\\Extension\\\\Asset not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/PlatesAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Property BlitzPHP\\\\View\\\\Adapters\\\\PlatesAdapter\\:\\:\\$engine has unknown class League\\\\Plates\\\\Engine as its type\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/PlatesAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to constant CACHING_LIFETIME_SAVED on an unknown class Smarty\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/SmartyAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Access to constant CACHING_OFF on an unknown class Smarty\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/SmartyAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addPluginsDir\\(\\) on an unknown class Smarty\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/SmartyAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method assign\\(\\) on an unknown class Smarty\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/SmartyAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method fetch\\(\\) on an unknown class Smarty\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/SmartyAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method setCacheLifetime\\(\\) on an unknown class Smarty\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/SmartyAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method setCaching\\(\\) on an unknown class Smarty\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/SmartyAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method setCompileId\\(\\) on an unknown class Smarty\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/SmartyAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method setTemplateDir\\(\\) on an unknown class Smarty\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/SmartyAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Class Smarty not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/SmartyAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class Smarty not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/SmartyAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Property BlitzPHP\\\\View\\\\Adapters\\\\SmartyAdapter\\:\\:\\$engine has unknown class Smarty as its type\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/SmartyAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addFilter\\(\\) on an unknown class Twig\\\\Environment\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addFunction\\(\\) on an unknown class Twig\\\\Environment\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method addGlobal\\(\\) on an unknown class Twig\\\\Environment\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method disableAutoReload\\(\\) on an unknown class Twig\\\\Environment\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method disableDebug\\(\\) on an unknown class Twig\\\\Environment\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method disableStrictVariables\\(\\) on an unknown class Twig\\\\Environment\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method enableAutoReload\\(\\) on an unknown class Twig\\\\Environment\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method enableDebug\\(\\) on an unknown class Twig\\\\Environment\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method enableStrictVariables\\(\\) on an unknown class Twig\\\\Environment\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method render\\(\\) on an unknown class Twig\\\\Environment\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method setCache\\(\\) on an unknown class Twig\\\\Environment\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Call to method setCharset\\(\\) on an unknown class Twig\\\\Environment\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Class Twig\\\\Environment not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Class Twig\\\\TwigFilter not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Class Twig\\\\TwigFunction not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class Twig\\\\Environment not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Instantiated class Twig\\\\Loader\\\\FilesystemLoader not found\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: parameter.notFound 'message' => '#^PHPDoc tag @param references unknown parameter\\: \\$cache_id$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: parameter.notFound 'message' => '#^PHPDoc tag @param references unknown parameter\\: \\$compile_id$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: parameter.notFound 'message' => '#^PHPDoc tag @param references unknown parameter\\: \\$parent$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: parameter.notFound 'message' => '#^PHPDoc tag @param references unknown parameter\\: \\$template$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', ]; $ignoreErrors[] = [ + // identifier: class.notFound 'message' => '#^Property BlitzPHP\\\\View\\\\Adapters\\\\TwigAdapter\\:\\:\\$engine has unknown class Twig\\\\Environment as its type\\.$#', 'count' => 1, 'path' => __DIR__ . '/src/View/Adapters/TwigAdapter.php', diff --git a/phpstan.neon.dist b/phpstan.neon.dist index b21e1b61..1b9b4934 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -17,7 +17,12 @@ parameters: - src/Debug/Toolbar/Views/toolbar.tpl.php scanDirectories: - src/Helpers - checkMissingIterableValueType: false - checkGenericClassInNonGenericObjectType: false + ignoreErrors: + - + identifier: property.phpDocType + - + identifier: method.childParameterType checkMissingCallableSignature: true treatPhpDocTypesAsCertain: false + strictRules: + allRules: false diff --git a/src/Cli/Commands/Utilities/About.php b/src/Cli/Commands/Utilities/About.php index d2c3a9e0..8d837ed4 100644 --- a/src/Cli/Commands/Utilities/About.php +++ b/src/Cli/Commands/Utilities/About.php @@ -99,7 +99,7 @@ public function execute(array $params) return $index === false ? 99 : $index; }) - ->filter(fn ($data, $key) => $this->option('only') ? in_array($this->toSearchKeyword($key), $this->sections(), true) : true) + ->filter(fn ($data, $key) => ((bool) $this->option('only')) ? in_array($this->toSearchKeyword($key), $this->sections(), true) : true) ->pipe(fn ($data) => $this->display($data)); return EXIT_SUCCESS; @@ -110,7 +110,7 @@ public function execute(array $params) */ protected function display(Collection $data): void { - $this->option('json') ? $this->displayJson($data) : $this->displayDetail($data); + ((bool) $this->option('json')) ? $this->displayJson($data) : $this->displayDetail($data); } /** diff --git a/src/Cli/Console/Command.php b/src/Cli/Console/Command.php index 23fb7050..1314690c 100644 --- a/src/Cli/Console/Command.php +++ b/src/Cli/Console/Command.php @@ -71,7 +71,7 @@ abstract class Command /** * la description des options de la commande * - * @var array + * @var array * * @example * `[ @@ -83,7 +83,7 @@ abstract class Command /** * La description des arguments de la commande * - * @var array + * @var array * * @example * `[ diff --git a/src/Container/Container.php b/src/Container/Container.php index 0fcf46c8..072df7d9 100644 --- a/src/Container/Container.php +++ b/src/Container/Container.php @@ -101,7 +101,7 @@ public function make(string $name, array $parameters = []): mixed * Appelle la fonction donnée en utilisant les paramètres donnés. * Les paramètres manquants seront résolus à partir du conteneur. * - * @param array|callable|string $callable Fonction à appeler. + * @param array|callable|string $callback Fonction à appeler. * @param array $parameters Paramètres facultatifs à utiliser pour construire l'entrée. * Utilisez ceci pour forcer des paramètres spécifiques à des valeurs spécifiques. * Les paramètres non définis dans ce tableau seront résolus en utilisant le conteneur. diff --git a/src/Core/App.php b/src/Core/App.php index d9a1c06f..de53880d 100644 --- a/src/Core/App.php +++ b/src/Core/App.php @@ -60,13 +60,11 @@ public static function className(string $class, string $type = '', string $suffi $fullname = '\\' . str_replace('/', '\\', $type . '\\' . $name) . $suffix; $base = $plugin ?: APP_NAMESPACE; - if ($base !== null) { - $base = str_replace('/', '\\', rtrim($base, '\\')); + $base = str_replace('/', '\\', rtrim($base, '\\')); - if (static::_classExistsInBase($fullname, $base)) { - /** @var class-string */ - return $base . $fullname; - } + if (static::_classExistsInBase($fullname, $base)) { + /** @var class-string */ + return $base . $fullname; } if ($plugin || ! static::_classExistsInBase($fullname, 'BlitzPHP')) { diff --git a/src/Debug/Logger.php b/src/Debug/Logger.php index 9173e5da..d226ad0b 100644 --- a/src/Debug/Logger.php +++ b/src/Debug/Logger.php @@ -213,7 +213,7 @@ private function pushFileHandler(stdClass $options): void $filename = strtolower($this->config->name ?: 'application'); $extension = $options->extension ?: '.log'; - if ($options->dayly_rotation ?: true === true) { + if (($options->dayly_rotation ?: true) === true) { $handler = new RotatingFileHandler($directory . $filename . $extension, $options->max_files ?: 0, $options->level ?: LogLevel::DEBUG, true, $options->permissions ?: 644); } else { $handler = new StreamHandler($directory . $filename . $extension, $options->level ?: LogLevel::DEBUG, true, $options->permissions ?: 644); diff --git a/src/Exceptions/RedirectException.php b/src/Exceptions/RedirectException.php index db64230f..e9807496 100644 --- a/src/Exceptions/RedirectException.php +++ b/src/Exceptions/RedirectException.php @@ -16,6 +16,7 @@ use Exception; use LogicException; use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\ServerRequestInterface; use Throwable; /** @@ -70,4 +71,9 @@ public function getResponse(): ResponseInterface return $this->response; } + + public function toResponse(ServerRequestInterface $request): ResponseInterface + { + return $this->getResponse(); + } } diff --git a/src/Helpers/common.php b/src/Helpers/common.php index 828c476b..1beebb77 100644 --- a/src/Helpers/common.php +++ b/src/Helpers/common.php @@ -215,6 +215,8 @@ function config(null|array|string $key = null, $default = null) $config->set($k, $v); } } + + return null; } } diff --git a/src/Helpers/url.php b/src/Helpers/url.php index aa9dba41..9fd65cd8 100644 --- a/src/Helpers/url.php +++ b/src/Helpers/url.php @@ -215,6 +215,8 @@ function anchor_popup(string $uri = '', string $title = '', $attributes = false) $windowName = '_blank'; } + $atts = []; + foreach (['width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'menubar' => 'no', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0'] as $key => $val) { $atts[$key] = $attributes[$key] ?? $val; unset($attributes[$key]); diff --git a/src/Http/Negotiator.php b/src/Http/Negotiator.php index cd2f8389..f98a1488 100644 --- a/src/Http/Negotiator.php +++ b/src/Http/Negotiator.php @@ -245,7 +245,7 @@ public function parseHeader(string $header): array protected function match(array $acceptable, string $supported, bool $enforceTypes = false): bool { $supported = $this->parseHeader($supported); - if (is_array($supported) && count($supported) === 1) { + if (count($supported) === 1) { $supported = $supported[0]; } diff --git a/src/Http/Response.php b/src/Http/Response.php index c529e081..9885fe7a 100644 --- a/src/Http/Response.php +++ b/src/Http/Response.php @@ -1342,7 +1342,7 @@ public function withFile(SplFileInfo|string $file, array $options = []): static if (isset($contentType)) { $new = $new->withType($contentType); } - $name = $options['name'] ?: $file->getFileName(); + $name = $options['name'] ?: $file->getFilename(); $new = $new->withDownload($name) ->withHeader('Content-Transfer-Encoding', 'binary'); } diff --git a/src/Http/ServerRequest.php b/src/Http/ServerRequest.php index 43a0698b..ce3be271 100644 --- a/src/Http/ServerRequest.php +++ b/src/Http/ServerRequest.php @@ -1520,7 +1520,7 @@ public function withAttribute(string $name, mixed $value): static { $new = clone $this; if (in_array($name, $this->emulatedAttributes, true)) { - $new->{$name} = $value; + // $new->{$name} = $value; } else { $new->attributes[$name] = $value; } diff --git a/src/Http/ServerRequestFactory.php b/src/Http/ServerRequestFactory.php index ce81b0d6..5274dc73 100644 --- a/src/Http/ServerRequestFactory.php +++ b/src/Http/ServerRequestFactory.php @@ -163,7 +163,7 @@ public function createServerRequest(string $method, $uri, array $serverParams = */ private static function normalizeServer(array $server, ?callable $apacheRequestHeaderCallback = null): array { - if (null === $apacheRequestHeaderCallback && is_callable('apache_request_headers')) { + if (null === $apacheRequestHeaderCallback && function_exists('apache_request_headers')) { $apacheRequestHeaderCallback = 'apache_request_headers'; } diff --git a/src/Http/Uri.php b/src/Http/Uri.php index 382bef32..f5eaec7e 100644 --- a/src/Http/Uri.php +++ b/src/Http/Uri.php @@ -722,7 +722,7 @@ protected function applyParts(array $parts) $this->setScheme('http'); } - if (isset($parts['port']) && null !== $parts['port']) { + if (isset($parts['port'])) { // Les numéros de port valides sont appliqués par les précédents parse_url ou setPort() $this->port = $parts['port']; } diff --git a/src/Router/Dispatcher.php b/src/Router/Dispatcher.php index 4c06fed3..2758ec84 100644 --- a/src/Router/Dispatcher.php +++ b/src/Router/Dispatcher.php @@ -232,7 +232,7 @@ public function run(?RouteCollectionInterface $routes = null, bool $returnRespon return $this->response; } - $this->sendResponse(); + return $this->sendResponse(); } /**