diff --git a/app/controllers/general.php b/app/controllers/general.php index 79929816d9..c3653ee3d5 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -748,12 +748,7 @@ function router(Http $utopia, Database $dbForPlatform, callable $getProjectDB, S } if (\is_array($values)) { - $count = 0; - foreach ($values as $value) { - $override = $count === 0; - $response->addHeader($name, $value, override: $override); - $count++; - } + $response->addHeader($name, \implode(', ', $values)); } else { $response->addHeader($name, $values); } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 8e9d8a5a38..29a3b44b35 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -114,12 +114,6 @@ parameters: count: 1 path: app/controllers/mock.php - - - message: '#^Variable \$register might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: app/http.php - - message: '#^Variable \$tag on left side of \?\? always exists and is always null\.$#' identifier: nullCoalesce.variable @@ -156,12 +150,6 @@ parameters: count: 1 path: app/init/registers.php - - - message: '#^Variable \$hostname on left side of \?\? always exists and is not nullable\.$#' - identifier: nullCoalesce.variable - count: 1 - path: app/init/resources.php - - message: '#^Anonymous function has an unused use \$register\.$#' identifier: closure.unusedUse @@ -180,12 +168,6 @@ parameters: count: 1 path: app/realtime.php - - - message: '#^Binary operation "\*" between \-1 and string results in an error\.$#' - identifier: binaryOp.invalid - count: 3 - path: app/worker.php - - message: '#^Anonymous function has an unused use \$context\.$#' identifier: closure.unusedUse @@ -438,18 +420,6 @@ parameters: count: 1 path: src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php - - - message: '#^Undefined variable\: \$cpus$#' - identifier: variable.undefined - count: 3 - path: src/Appwrite/Platform/Modules/Functions/Workers/Builds.php - - - - message: '#^Undefined variable\: \$memory$#' - identifier: variable.undefined - count: 3 - path: src/Appwrite/Platform/Modules/Functions/Workers/Builds.php - - message: '#^Variable \$deployment might not be defined\.$#' identifier: variable.undefined