public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
    {
        $methodProperties = $phpcsFile->getMethodProperties($stackPtr);
        if ($methodProperties['scope'] !== 'public') {
            return;
        }

        parent::process($phpcsFile, $stackPtr);
    }
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
    {
        $methodProperties = $phpcsFile->getMethodProperties($stackPtr);
        if ($methodProperties['scope'] !== 'public') {
            return;
        }

        parent::process($phpcsFile, $stackPtr);
    }
public function process ( PHP_CodeSniffer_File $ phpcsFile , $ stackPtr ) { $ methodProperties = $ phpcsFile -> getMethodProperties ( $ stackPtr ) ; if ( $ methodProperties [ 'scope' ] !== 'public' ) { return ; } parent :: process ( $ phpcsFile , $ stackPtr ) ; }
Ensures only public methods are processed.

@param PHP_CodeSniffer_File $phpcsFile The file being scanned.
@param int                  $stackPtr  The position of the current token in the stack passed in $tokens.

@return void
Ensures only public methods are processed .