ObjectCalisthenics\AbstractIdentifierLengthSniff::process PHP Method

process() public method

public process ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr )
$phpcsFile PHP_CodeSniffer_File
$stackPtr integer
    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
    {
        $this->phpcsFile = $phpcsFile;
        $this->stackPtr = $stackPtr;
        $tokens = $phpcsFile->getTokens();
        $token = $tokens[$stackPtr];
        $content = mb_substr($token['content'], $this->tokenTypeLengthFactor);
        if (!$this->isValid($phpcsFile, $stackPtr)) {
            return;
        }
        if ($this->isShortContentAllowed($content)) {
            return;
        }
        $this->handleMinContentLength($content);
    }