squizlabs/PHP_CodeSniffer — pull request #97 by zBart (2013-03-05 14:20:28+00:00)
Title: PSR2 causes a notice on functions called '_'

When running PHPCS with the PSR2 standard I got a notice that $methodName[1] was undefined. Turns out we have a function called '_', which causes the sniff to check for the second character (which doesn't exist).

So I added an isset() to make sure the second character exists. I purposely made it part of the condition because if you have a function called '_' it isn't used to indicate visibility.