use null coalesce in Server->getLevel()

This commit is contained in:
Dylan K. Taylor 2017-09-25 09:51:21 +01:00
parent f5534a9ab0
commit 89e4defa29

View File

@ -947,11 +947,7 @@ class Server{
* @return Level|null * @return Level|null
*/ */
public function getLevel(int $levelId) : ?Level{ public function getLevel(int $levelId) : ?Level{
if(isset($this->levels[$levelId])){ return $this->levels[$levelId] ?? null;
return $this->levels[$levelId];
}
return null;
} }
/** /**