From e4753738e90d4bc8d869578bf656af0c54bf5996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Fri, 23 Feb 2024 17:55:57 +0100 Subject: [PATCH] ApiRoute: skip optional flags --- phpstan.neon | 3 +++ src/Presenter/ApiRoute.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index 0e7c73f4..9bdd6dc9 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -34,6 +34,9 @@ parameters: # Allow empty() - '#Construct empty\(\) is not allowed. Use more strict comparison.$#' + # ApiRoute optional flag + - '#Constructor of class Apitte\\Presenter\\ApiRoute has an unused parameter \$flags.$#' + # Ignore bad php behavior - should not happen - message: '#\|false given\.$#' path: %currentWorkingDirectory%/src/Debug/Tracy/BlueScreen/ValidationBlueScreen.php diff --git a/src/Presenter/ApiRoute.php b/src/Presenter/ApiRoute.php index a8137282..4d591658 100644 --- a/src/Presenter/ApiRoute.php +++ b/src/Presenter/ApiRoute.php @@ -18,7 +18,7 @@ public function __construct(string $prefix, array $metadata = [], int $flags = 0 $metadata['presenter'] = self::APITTE_MODULE; } - parent::__construct(rtrim($prefix, '/') . '/', $metadata, $flags); + parent::__construct(rtrim($prefix, '/') . '/', $metadata); } }