Apply suggestions from code review

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
Michael Vogel 2021-07-27 15:16:31 +02:00 committed by GitHub
parent 8dd21d82f5
commit c03fb998f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,7 +126,6 @@ class Profiler implements ContainerInterface
$callstack = $callstack ?: System::callstack(4, $value == 'rendering' ? 0 : 1); $callstack = $callstack ?: System::callstack(4, $value == 'rendering' ? 0 : 1);
if (!isset($this->performance[$value])) { if (!isset($this->performance[$value])) {
// Prevent ugly E_NOTICE
$this->performance[$value] = 0; $this->performance[$value] = 0;
} }
@ -283,6 +282,7 @@ class Profiler implements ContainerInterface
} }
} }
} }
if (isset($this->callstack["rendering"])) { if (isset($this->callstack["rendering"])) {
$output .= "\nRendering:\n"; $output .= "\nRendering:\n";
foreach ($this->callstack["rendering"] as $func => $time) { foreach ($this->callstack["rendering"] as $func => $time) {