Skip to content

Commit

Permalink
Merge pull request #408 from koriym/sooth_sa
Browse files Browse the repository at this point in the history
Soothe SA
  • Loading branch information
koriym authored Oct 15, 2022
2 parents fe0192f + ec2d3d8 commit 2d068e6
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 32 deletions.
26 changes: 0 additions & 26 deletions psalm-baseline.xml

This file was deleted.

1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
>
<projectFiles>
<directory name="src"/>
Expand Down
4 changes: 1 addition & 3 deletions src/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/CompileAutoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/FakeRun.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2d068e6

Please sign in to comment.