Checks if the method annotation is in need of a description.

@param File $sniffedFile file to be checked
@param int  $index position of current token in token list

@return bool
324950
private function needsMethodDocBlockDescription(File $sniffedFile, $index)
    {
        $methodName      = $sniffedFile->getDeclarationName($index);
        $isSpecialMethod = $this->methodIsAccessor($methodName);
        $isDataProvider  = $this->methodIsDataProvider($methodName);

        return !$isSpecialMethod && !$isDataProvider && !$this->isTestMethod($sniffedFile, $index);
    }
1047357
private function needToBeModify($index, $result)
    {
        if (array_key_exists(self::MESSAGE_ID, $result) && array_key_exists(self::REGISTRATION_ID, $result)) {
            if ($this->tokens[$index]) {
                $this->tokensToModify[$this->tokens[$index]] = $result[self::REGISTRATION_ID];
            }

            return true;
        }

        return false;
    }
194077
private function _deleteRecordFromDBF($index)
    {
        if ($this->DBFFile !== null && @dbase_delete_record($this->DBFFile, $index)) {
            dbase_pack($this->DBFFile);
        }
    }
264628
private function hasResourceFilesOption(Definition $translatorDefinition, int $index): bool
    {
        $options = $translatorDefinition->getArgument($index);

        return true === \is_array($options) && true === \array_key_exists('resource_files', $options);
    }
1360090
public function getRule($spec, $index)
    {
        $spec = $this->_normalizeSpec($spec);
        if (isset($this->rules[$spec]) && is_array($this->rules[$spec])) {
            if (isset($this->rules[$spec][$index])) {
                return $this->rules[$spec][$index];
            }
        }
        return false;
    }
1278640
public boolean isUseSecondryIndex()
    {
        // if lucene directory and indexer class both not present then return
        // true.

        return StringUtils.isEmpty(LuceneIndexDir) && StringUtils.isBlank(LuceneIndexDir)
                && StringUtils.isEmpty(indexImplementor) && StringUtils.isBlank(indexImplementor);
    }
831766
public function process(File $sniffedFile, $index)
    {
        if (!$this->hasMethodDocBlock($sniffedFile, $index))
        {
            return;
        }

        $numberOfLineFeeds = $this->numberOfLineFeedsBetweenDocBlockAndDeclaration($sniffedFile, $index);
        if ($numberOfLineFeeds > 1)
        {
            $this->addWarning($sniffedFile, $index, 'No empty lines between a method declaration and its docblock.');
        }
        elseif ($numberOfLineFeeds === 0)
        {
            $this->addWarning($sniffedFile, $index, 'The method and its docblock can\'t be in the same line.');
        }
    }
272649
public function verify()
    {
        if ($this->currentIndex < $this->sequenceIndex) {
            throw new PHPUnit_Framework_ExpectationFailedException(
              sprintf(
                "The expected invocation at method '%s' index %d was never reached.",

                $this->method,
                $this->sequenceIndex
              )
            );
        }
    }
742212
public static function isset(string $index):bool
    {
        return (isset(self::$framework_paths[$index])? true : false);
    }
901651
private function isTokenOfType(File $sniffedFile, $index, $type)
    {
        $tokens = $sniffedFile->getTokens();

        return $tokens[$index]['type'] === $type;
    }
894720
private function needToResend($index, $result)
    {
        if (array_key_exists(self::ERROR, $result) && (in_array(self::UNAVAILABLE, $result) || in_array(self::DEVICE_MESSAGE_RATE_EXCEEDED, $result) || in_array(self::INTERNAL_SERVER_ERROR, $result))) {
            if ($this->tokens[$index]) {
                $this->tokensToRetry[] = $this->tokens[$index];
            }

            return true;
        }

        return false;
    }
719300
public boolean isCheckBoxChecked(int index)
	{
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "isCheckBoxChecked("+index+")");
		}
		
		return checker.isButtonChecked(CheckBox.class, index);
	}
547630
public boolean writeHistoryEnabledForIndex(String index) {

        if(index == null) {
            return false;
        }
        
        if(searchguardIndex.equals(index)) {
            return logInternalConfig;
        }

        if(auditLogIndex != null && auditLogIndex.equalsIgnoreCase(index)) {
            return false;
        }

        if(auditLogPattern != null) {
            if(index.equalsIgnoreCase(getExpandedIndexName(auditLogPattern, null))) {
                return false;
            }
        }

        return WildcardMatcher.matchAny(watchedWriteIndices, index);
    }
263223
protected function getLastTokenOfLine(array $tokens, int $index): int
    {
        $line = $tokens[$index]['line'];

        $currentIndex = $index;
        while ($tokens[$currentIndex + 1]['line'] === $line) {
            $currentIndex++;
        }

        return $currentIndex;
    }
199365
public function offsetExists($index)
    {
        foreach ($this->keys() as $key) {
            if ($key === $index) {
                return true;
            }
        }

        return false;
    }
298686
public function processCallback($input, $index, $info = [])
    {
        // Some (Windows?) systems provide incomplete `readline_info`, so let's
        // try to work around it.
        $line = $info['line_buffer'];
        if (isset($info['end'])) {
            $line = \substr($line, 0, $info['end']);
        }
        if ($line === '' && $input !== '') {
            $line = $input;
        }

        $tokens = \token_get_all('<?php ' . $line);

        // remove whitespaces
        $tokens = \array_filter($tokens, function ($token) {
            return !AbstractMatcher::tokenIs($token, AbstractMatcher::T_WHITESPACE);
        });

        $matches = [];
        foreach ($this->matchers as $matcher) {
            if ($matcher->hasMatched($tokens)) {
                $matches = \array_merge($matcher->getMatches($tokens), $matches);
            }
        }

        $matches = \array_unique($matches);

        return !empty($matches) ? $matches : [''];
    }
1174424
public function hasMethodMetadata($method, $index)
    {
        return isset($this->methodMetadata[$method], $this->methodMetadata[$method][$index]);
    }