diff --git a/gatherling/util/updateDefaultFormats.php b/gatherling/util/updateDefaultFormats.php index 02dde48a..a03d84ea 100644 --- a/gatherling/util/updateDefaultFormats.php +++ b/gatherling/util/updateDefaultFormats.php @@ -9,6 +9,8 @@ use Gatherling\Models\Formats; use Gatherling\Exceptions\SetMissingException; +use function Gatherling\Views\server; + set_time_limit(0); require_once __DIR__ . '/../lib.php'; @@ -30,6 +32,6 @@ function main(): void } } -if (basename(__FILE__) == basename($_SERVER['PHP_SELF'])) { +if (basename(__FILE__) == basename(server()->string('PHP_SELF'))) { main(); } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 8b535f5b..d1f3d691 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -3985,11 +3985,6 @@ parameters: count: 1 path: gatherling/util/updateDefaultFormats.php - - - message: "#^Parameter \\#1 \\$path of function basename expects string, mixed given\\.$#" - count: 1 - path: gatherling/util/updateDefaultFormats.php - - message: "#^Offset 'name' might not exist on array\\\\|null\\.$#" count: 1