remove if else for same return
Merge pull request #4243 from samsonasik/fix/ifelse.remv

remove if else for same return
replaced get_called_class() with get_class($this) in non-static context