[BUGFIX] Avoid unnecessary 4.6+ only method usage

This commit replaces all occurrences of $this->hasArgument() with isset/empty conditions and adds some fixes to adhere coding guidelines