private function processReturnTypeToken(File $phpcsFile, $stackPtr)
    {
        $returnTypeHint   = $this->getReturnTypeHintName($phpcsFile, $stackPtr);
        $returnTypeHint   = ltrim($returnTypeHint, '\\');
        $returnTypeHintLc = strtolower($returnTypeHint);

        if (isset($this->newClasses[$returnTypeHintLc]) === false) {
            return;
        }

        // Still here ? Then this is a return type declaration using a new class.
        $itemInfo = array(
            'name'   => $returnTypeHint,
            'nameLc' => $returnTypeHintLc,
        );
        $this->handleFeature($phpcsFile, $stackPtr, $itemInfo);
    }
private function processReturnTypeToken(File $phpcsFile, $stackPtr)
    {
        $returnTypeHint   = $this->getReturnTypeHintName($phpcsFile, $stackPtr);
        $returnTypeHint   = ltrim($returnTypeHint, '\\');
        $returnTypeHintLc = strtolower($returnTypeHint);

        if (isset($this->newClasses[$returnTypeHintLc]) === false) {
            return;
        }

        // Still here ? Then this is a return type declaration using a new class.
        $itemInfo = array(
            'name'   => $returnTypeHint,
            'nameLc' => $returnTypeHintLc,
        );
        $this->handleFeature($phpcsFile, $stackPtr, $itemInfo);
    }
private function processReturnTypeToken ( File $ phpcsFile , $ stackPtr ) { $ returnTypeHint = $ this -> getReturnTypeHintName ( $ phpcsFile , $ stackPtr ) ; $ returnTypeHint = ltrim ( $ returnTypeHint , '\\' ) ; $ returnTypeHintLc = strtolower ( $ returnTypeHint ) ; if ( isset ( $ this -> newClasses [ $ returnTypeHintLc ] ) === false ) { return ; } // Still here ? Then this is a return type declaration using a new class. $ itemInfo = array ( 'name' => $ returnTypeHint , 'nameLc' => $ returnTypeHintLc , ) ; $ this -> handleFeature ( $ phpcsFile , $ stackPtr , $ itemInfo ) ; }
Processes this test for when a return type token is encountered.

- Detect new classes when used as a return type declaration.

@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
Processes this test for when a return type token is encountered .