I\'ve the following PHP method which is part of the codebase which was working fine:
Yeah, as previously stated by aynber, you can't pass in $this as a function param. By doing so, you're basically redeclaring it. You should just remove it as a function param.