diff --git a/EventListener/DebugHandlersListener.php b/EventListener/DebugHandlersListener.php index cfc277e330..5027bd1169 100644 --- a/EventListener/DebugHandlersListener.php +++ b/EventListener/DebugHandlersListener.php @@ -60,7 +60,7 @@ public function __construct(callable $exceptionHandler = null, LoggerInterface $ $this->exceptionHandler = $exceptionHandler; $this->logger = $logger; - $this->levels = null === $levels ? \E_ALL : $levels; + $this->levels = $levels ?? \E_ALL; $this->throwAt = \is_int($throwAt) ? $throwAt : (null === $throwAt ? null : ($throwAt ? \E_ALL : null)); $this->scream = $scream; $this->fileLinkFormat = $fileLinkFormat; diff --git a/Profiler/Profile.php b/Profiler/Profile.php index ac5b5044c1..88e82b4e2f 100644 --- a/Profiler/Profile.php +++ b/Profiler/Profile.php @@ -156,11 +156,7 @@ public function setUrl($url) */ public function getTime() { - if (null === $this->time) { - return 0; - } - - return $this->time; + return $this->time ?? 0; } /** diff --git a/Tests/KernelTest.php b/Tests/KernelTest.php index 63fb4973f6..ec57289dde 100644 --- a/Tests/KernelTest.php +++ b/Tests/KernelTest.php @@ -709,7 +709,7 @@ protected function getBundle($dir = null, $parent = null, $className = null, $bu $bundle ->expects($this->any()) ->method('getName') - ->willReturn(null === $bundleName ? \get_class($bundle) : $bundleName) + ->willReturn($bundleName ?? \get_class($bundle)) ; $bundle