The expression return Symfony\Component...e($this->getDuration()) could return the type null which is incompatible with the type-hinted return string. Consider adding an additional type-check to rule them out.
Loading history...
43
}
44
45
12
final public function getMemory(): int
46
{
47
12
$this->ensureHasRun();
48
49
12
return $this->memory;
50
}
51
52
12
final public function getFormattedMemory(): string
53
{
54
12
return Helper::formatMemory($this->getMemory());
55
}
56
57
32
final protected function markAsRun(int $memory): void
58
{
59
32
$this->duration = \time() - $this->startTime();
60
32
$this->memory = $memory;
61
32
}
62
63
34
final protected function ensureHasRun(): void
64
{
65
34
if (!$this->hasRun()) {
66
2
throw new \LogicException("\"{$this}\" has not yet run.");