Is it possible to rewrite this piece of code any better when it comes to efficiency and/or readability?
public function dispatch()
{
$key = array_search($this->reqUri, $this->routes);
if ($key !== false) {
if (isset($this->methods[$key])) {
if ($this->methods[$key] === $this->reqMethod) {
call_user_func($this->callables[$key]);
return;
} else {
$this->defaultCallable();
return;
}
}
call_user_func($this->callables[$key]);
return;
}
$this->defaultCallable();
}