Code Duplication    Length = 5-5 lines in 2 locations

Sniff.php 2 locations

@@ 967-971 (lines=5) @@
964
            return $tokens[$stackPtr]['code'];
965
        }
966
967
        if ($tokens[$stackPtr]['code'] !== T_FUNCTION
968
            && (defined(T_CLOSURE) && $tokens[$stackPtr]['code'] !== T_CLOSURE)
969
        ) {
970
            return false;
971
        }
972
973
        if (isset($tokens[$stackPtr]['parenthesis_closer'], $tokens[$stackPtr]['scope_opener']) === false
974
            || ($tokens[$stackPtr]['parenthesis_closer'] + 1) === $tokens[$stackPtr]['scope_opener']
@@ 1055-1059 (lines=5) @@
1052
            return false;
1053
        }
1054
1055
        if ($tokens[$stackPtr]['code'] !== T_FUNCTION
1056
            && (defined(T_CLOSURE) && $tokens[$stackPtr]['code'] !== T_CLOSURE)
1057
        ) {
1058
            throw new PHP_CodeSniffer_Exception('$stackPtr must be of type T_FUNCTION or T_CLOSURE');
1059
        }
1060
1061
        $opener = $tokens[$stackPtr]['parenthesis_opener'];
1062
        $closer = $tokens[$stackPtr]['parenthesis_closer'];