no need <code>else</code>, just <code>return count($this->index) > 0;</code>  directly after closing bracket because already return early.