Skip to content

Commit ecb91d3

Browse files
Use ??= more
1 parent d3d9551 commit ecb91d3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Controller/ProfilerController.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,7 @@ public function openAction(Request $request): Response
369369

370370
protected function getTemplateManager(): TemplateManager
371371
{
372-
if (null === $this->templateManager) {
373-
$this->templateManager = new TemplateManager($this->profiler, $this->twig, $this->templates);
374-
}
375-
376-
return $this->templateManager;
372+
return $this->templateManager ??= new TemplateManager($this->profiler, $this->twig, $this->templates);
377373
}
378374

379375
private function denyAccessIfProfilerDisabled()

0 commit comments

Comments
 (0)