@param Node\Stmt\Function_ $declaredFunction

@return bool
11483
private function isFunctionExistenceChecked(Node\Stmt\Function_ $declaredFunction)
    {
        /** @var Node\Stmt\If_ $ifStatement */
        foreach ($this->ifStatementStack as $ifStatement) {
            $condition = $ifStatement->cond;

            $isConditionNegatedFunctionExistsCall = $condition
                && ($condition instanceof Node\Expr\BooleanNot)
                && $this->functionAnalyzer->isFunctionCallByStaticName($condition->expr, static::FUNCTION_EXISTS_FUNCTION_NAME);
            if (!$isConditionNegatedFunctionExistsCall) {
                continue;
            }

            /** @var Node\Expr\FuncCall $conditionFunction */
            $conditionFunction = $condition->expr;
            $checkedFunctionName = isset($conditionFunction->args[0]) ? $conditionFunction->args[0] : null;
            $isCheckedFunctionNameScalarString = $checkedFunctionName
                && ($checkedFunctionName instanceof Node\Arg)
                && ($checkedFunctionName->value instanceof Node\Scalar\String_);
            if (!$isCheckedFunctionNameScalarString) {
                continue;
            }

            $checkedFunctionName = $this->normalizeFunctionName($checkedFunctionName->value->value);
            if ($checkedFunctionName && $checkedFunctionName[0] === '\\') {
                $checkedFunctionName = substr($checkedFunctionName, 1);
            }

            $declaredFunctionName = $this->extractNormalizedFunctionName($declaredFunction);
            if ($checkedFunctionName === $declaredFunctionName) {
                return true;
            }
        }

        return false;
    }
1193308
private function add($value, $function)
    {
        if (!$this->exists($value)) {
            $function($this->values, $value);

            if ($this->isLimitExceeded()) {
                $this->removeLatest();
            }

            return true;
        } else {
            return false;
        }
    }
1136387
function isFunctionParam( $param )
    {
        $isFunction = false;
        if( is_array( $param) && isset( $param['_function'] ) )
            $isFunction = true;

        return $isFunction;
    }
1182662
protected function hasFunctionCallWithForeachArgument(Node $node, array $functions, $skippedByRefType = null)
    {
        if (!$this->functionAnalyzer->isFunctionCallByStaticName($node, $functions)) {
            return false;
        }

        /** @var Node\Expr\FuncCall $node */
        foreach ($node->args as $argument) {
            /** @var Node\Stmt\Foreach_ $foreach */
            foreach ($this->getCurrentLoopStack() as $foreach) {
                if ($skippedByRefType !== null && $foreach->byRef === $skippedByRefType) {
                    continue;
                }

                if ($argument->value instanceof Node\Expr\Variable
                    && $argument->value->name === $this->getForeachVariableName($foreach)
                ) {
                    return true;
                }
            }
        }

        return false;
    }
293848
private function isSimilar(string $comparisonFunctionContent, string $currentFunctionContent): bool
    {
        $numberOfcomparisonFunctionContentLines = array_filter(
            explode("\n", $comparisonFunctionContent),
            function($line){
                return !empty(trim($line));
            }
        );

        $currentFunctionContentLines = array_filter(
            explode("\n", $currentFunctionContent),
            function($line){
                return !empty(trim($line));
            }
        );

        if (count($numberOfcomparisonFunctionContentLines) <= 5 || count($currentFunctionContentLines) <= 5 ) {
            return false;
        }

        similar_text($comparisonFunctionContent, $currentFunctionContent, $perc);

        return $perc > 60;
    }
878020
public function isTerminalType()
    {
        if(!$this->hasValidResource()) {
            return false;
        }

        if (function_exists('stream_isatty')) {
            /** @noinspection PhpVoidFunctionResultUsedInspection */
            return (bool)stream_isatty($this->resource);
        }

        return false;
    }
205905
public function functionAvailable($functionName)
    {
        $result = false;
        if (is_string($functionName)) {
            $functionName = trim($functionName);
            if ($functionName !== '') {
                if (function_exists($functionName)) {
                    $disabledFunctions = $this->getDisabledFunctions();
                    if (!in_array(strtolower($functionName), $disabledFunctions, true)) {
                        $result = true;
                    }
                }
            }
        }

        return $result;
    }
1150675
static public function isInternalFunction($functionName)
    {
        $functionName = strtolower($functionName);

        return isset(self::$_STRING_FUNCTIONS[$functionName])
            || isset(self::$_DATETIME_FUNCTIONS[$functionName])
            || isset(self::$_NUMERIC_FUNCTIONS[$functionName]);
    }
510131
public function exists(callable $func)
    {
        $isExists = false;

        foreach ($this->elements as $key => $value) {
            if ($func($key, $value)) {
                $isExists = true;
                break;
            }
        }

        return $isExists;
    }
1095607
public function isImplemented($pFunction = '') {
		$pFunction = strtoupper ($pFunction);
		if (isset(self::$_PHPExcelFunctions[$pFunction])) {
			return (self::$_PHPExcelFunctions[$pFunction]['functionCall'] != 'PHPExcel_Calculation_Functions::DUMMY');
		} else {
			return FALSE;
		}
	}
946222
private boolean isDefinedFunctionName(String functionName) {
        return FunctionForVoltDB.isFunctionNameDefined(functionName)
                || FunctionSQL.isFunction(functionName)
                || FunctionCustom.getFunctionId(functionName) != ID_NOT_DEFINED
                || (null != m_schema.findChild("ud_function", functionName));
    }
341107
public function isImplemented($pFunction = '')
    {
        $pFunction = strtoupper($pFunction);
        if (isset(self::$PHPExcelFunctions[$pFunction])) {
            return (self::$PHPExcelFunctions[$pFunction]['functionCall'] != 'PHPExcel_Calculation_Functions::DUMMY');
        } else {
            return false;
        }
    }
507085
public function addDisableFunctions($disabledFunction) {
        if ($this->searchParams->disableFunctions == null) {
            $this->searchParams->disableFunctions = array();
        }

        $this->searchParams->disableFunctions[] = $disabledFunction;
    }
901251
private function getMatchingFunctionNode(array $locatedFunctionNodes, IFunctionReflection $reflection)
    {
        $locationHash = $reflection->getLocation()->getHash();

        if (empty($locatedFunctionNodes[$locationHash])) {
            throw InvalidFunctionException::invalidFunctionMessage(
                    'Cannot parse function, the function could not be located',
                    $reflection->getInnerReflection()
            );
        }

        // If multiple functions defined on a single line we
        // perform all possible resolution to resolve the conflict.
        // Magic constants / scopes are resolved in parameter expressions
        // to allow matching of functions with these special constants in
        // default values.
        /** @var $matchedFunctionsByLocation LocatedFunctionNode[] */
        $matchedFunctionsByLocation = $locatedFunctionNodes[$locationHash];
        $functionSignature          = $reflection->getSignature();
        $fullyMatchedFunctions      = [];

        foreach ($matchedFunctionsByLocation as $matchedFunction) {
            $magicData                        = $reflection->resolveMagic($matchedFunction->getDeclaration());
            $resolvedMatchedFunctionSignature = $matchedFunction->getSignature()->resolveMagic($magicData);

            if ($functionSignature->getHash() === $resolvedMatchedFunctionSignature->getHash()) {
                $fullyMatchedFunctions[] = $matchedFunction;
            }
        }

        if (empty($fullyMatchedFunctions)) {
            throw InvalidFunctionException::invalidFunctionMessage(
                    'Cannot parse function, the function\'s signature could not be matched',
                    $reflection->getInnerReflection()
            );
        } elseif (count($fullyMatchedFunctions) > 1) {
            throw InvalidFunctionException::invalidFunctionMessage(
                    'Cannot parse function, %d ambiguous functions are defined on the same line '
                    . 'with identical signatures',
                    $reflection->getInnerReflection(),
                    count($locatedFunctionNodes[$locationHash])
            );
        }

        return $fullyMatchedFunctions[0];
    }
1121115
public function isFunctionCallByStaticName(Node $node, $checkedFunctionName)
    {
        $isFunctionCallByStaticName = $node instanceof Node\Expr\FuncCall && $node->name instanceof Node\Name;
        if (!$isFunctionCallByStaticName) {
            return $isFunctionCallByStaticName;
        }

        $calledFunctionName = strtolower($node->name->toString());

        return is_array($checkedFunctionName)
            ? isset($checkedFunctionName[$calledFunctionName])
            : $calledFunctionName === $checkedFunctionName;
    }
559893
protected boolean isReserved( String name ) {
        if( functions.isFunctionName(name))
            return true;

        for (int i = 0; i < name.length(); i++) {
            if( !isLetter(name.charAt(i)) )
                return true;
        }
        return false;
    }
1315559
private function isArrayAndInstanceOfCountable($left, $right): Bool
    {
        if (!($left instanceof Node && $right instanceof Node)) {
            return false;
        }

        if (!$this->isFunctionCall($left, 'is_array')) {
            return false;
        }
        $args = $left->children['args'];

        if ($args->kind !== \ast\AST_ARG_LIST) {
            return false;
        }
        $arg = $args->children[0];

        if ($right->kind !== \ast\AST_INSTANCEOF) {
            return false;
        }
        $expr = $right->children['expr'];
        $class = $right->children['class'];

        if ($class->kind === \ast\AST_NAME
              && $class->children['name'] === "Countable"
              && $this->isEqualsWithoutLineno($arg, $expr)) {
            return true;
        }

        return false;
    }