diff --git a/src/ServiceManager.php b/src/ServiceManager.php index e4d0c48f..28a239c6 100644 --- a/src/ServiceManager.php +++ b/src/ServiceManager.php @@ -191,7 +191,7 @@ public function get($name) } // Determine if the service should be shared. - $sharedService = isset($this->shared[$name]) ? $this->shared[$name] : $this->sharedByDefault; + $sharedService = $this->shared[$name] ?? $this->sharedByDefault; // We achieve better performance if we can let all alias // considerations out. @@ -206,7 +206,7 @@ public function get($name) } // We now deal with requests which may be aliases. - $resolvedName = isset($this->aliases[$name]) ? $this->aliases[$name] : $name; + $resolvedName = $this->aliases[$name] ?? $name; // The following is only true if the requested service is a shared alias. $sharedAlias = $sharedService && isset($this->services[$resolvedName]);