reduce cyclomatic complexity & duplicated code

Better do an `array_key_exists($method, $this->levels)` or an `isset($this->levels[$method])` here.