diff --git a/psalm-baseline.xml b/psalm-baseline.xml deleted file mode 100644 index f4bce4fd..00000000 --- a/psalm-baseline.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - $_SERVER['REQUEST_TIME_FLOAT'] - - - assert(is_float($start)) - is_float($start) - - - - - $_SERVER['REQUEST_TIME_FLOAT'] - - - assert(is_float($start)) - is_float($start) - - - - - $GLOBALS - - - diff --git a/psalm.xml b/psalm.xml index 2d644b5b..bc8f3e7a 100644 --- a/psalm.xml +++ b/psalm.xml @@ -6,7 +6,6 @@ xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor-bin/tools/vendor/vimeo/psalm/config.xsd https://getpsalm.org/schema/config " - errorBaseline="psalm-baseline.xml" > diff --git a/src/Compiler.php b/src/Compiler.php index 7c1f45ef..9df4a4ed 100644 --- a/src/Compiler.php +++ b/src/Compiler.php @@ -23,7 +23,6 @@ use function assert; use function count; use function file_exists; -use function is_float; use function is_int; use function memory_get_peak_usage; use function microtime; @@ -95,8 +94,7 @@ public function compile(): int ($this->compilerDiScripts)($this->appMeta); $failed = $this->newInstance->getFailed(); $dot = $failed ? '' : ($this->compilerObjectGraph)($module); - $start = $_SERVER['REQUEST_TIME_FLOAT']; - assert(is_float($start)); + $start = $_SERVER['REQUEST_TIME_FLOAT'] ?? 0; $time = number_format(microtime(true) - $start, 2); $memory = number_format(memory_get_peak_usage() / (1024 * 1024), 3); echo PHP_EOL; diff --git a/src/Compiler/CompileAutoload.php b/src/Compiler/CompileAutoload.php index 645ddbfa..271e6c91 100644 --- a/src/Compiler/CompileAutoload.php +++ b/src/Compiler/CompileAutoload.php @@ -78,7 +78,7 @@ public function __invoke(): int $classes = (array) $this->classes; $paths = $this->getPaths($classes); $autolaod = $this->saveAutoloadFile($this->appMeta->appDir, $paths); - $start = $_SERVER['REQUEST_TIME_FLOAT']; + $start = $_SERVER['REQUEST_TIME_FLOAT'] ?? 0; assert(is_float($start)); $time = number_format(microtime(true) - $start, 2); $memory = number_format(memory_get_peak_usage() / (1024 * 1024), 3); diff --git a/src/Compiler/FakeRun.php b/src/Compiler/FakeRun.php index e53a65c6..8b3ecaee 100644 --- a/src/Compiler/FakeRun.php +++ b/src/Compiler/FakeRun.php @@ -49,7 +49,7 @@ public function __invoke(): void $_SERVER['REQUEST_METHOD'] = 'GET'; $_SERVER['argc'] = 3; $_SERVER['argv'] = ['', 'get', 'page:://self/']; - /** @psalm-suppress MixedArgumentTypeCoercion */ + /** @psalm-suppress ArgumentTypeCoercion */ ($bootstrap)($this->appMeta->name, $this->context, $GLOBALS, $_SERVER); // @phpstan-ignore-line $_SERVER['REQUEST_METHOD'] = 'DELETE'; $app = $this->injector->getInstance(AppInterface::class);