Checks if the listener function is a magic php function without return.

@return bool Indicator if the current function is not a whitelisted function
540756
private function isMagicFunctionWithoutReturn(): bool
    {
        $whitelist = [
            '__construct',
            '__destruct',
            '__clone',
            '__wakeup',
            '__set',
            '__unset',
        ];

        $stackToken = $this->tokens[$this->stackPos];

        $functionNamePtr = $this->file->getBaseFile()->findNext(
            [T_STRING],
            $this->stackPos + 1,
            $stackToken['parenthesis_opener']
        );

        $functionNameToken = $this->tokens[$functionNamePtr];

        return in_array($functionNameToken['content'], $whitelist, true);
    }
878020
public function isTerminalType()
    {
        if(!$this->hasValidResource()) {
            return false;
        }

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

        return false;
    }
353711
protected function _functionNode()
    {
        $node = new FunctionDef();
        $token = $this->_stream->current(true);
        $parent = $this->_states['current'];

        $body = $token[1];
        $name = substr($this->_stream->next('('), 0, -1);
        $body .= $name;
        $node->name = trim($name);
        $args = $this->_parseArgs();
        $node->args = $args['args'];
        $body .= $args['body'] . $this->_stream->next([';', '{']);
        if ($parent) {
            $isMethod = $parent->hasMethods;
            if ($parent->type === 'interface') {
                $node->type = 'signature';
            }
        } else {
            $isMethod = false;
        }
        $node->isMethod = $isMethod;
        $node->isClosure = !$node->name;
        if ($isMethod) {
            $node->visibility = $this->_states['visibility'];
            $this->_states['visibility'] = [];
        }
        $node->body = $body;
        $this->_codeNode();
        $this->_states['body'] = $body;
        $this->_contextualize($node);

        // Looking for curly brackets only if not an "abstract function"
        if ($this->_stream->current() === '{') {
            $this->_states['current'] = $node;
        }

        return $node->function = $node;
    }
949122
public static function functionExists($function)
    {
        // eval() is a language construct
        if ($function == 'eval') {
            // does not check suhosin.executor.eval.whitelist (or blacklist)
            if (extension_loaded('suhosin')) {
                return @ini_get("suhosin.executor.disable_eval") != "1";
            }
            return true;
        }

        $exists = function_exists($function);

        if (extension_loaded('suhosin')) {
            $blacklist = @ini_get("suhosin.executor.func.blacklist");
            if (!empty($blacklist)) {
                $blacklistFunctions = array_map('strtolower', array_map('trim', explode(',', $blacklist)));
                return $exists && !in_array($function, $blacklistFunctions);
            }
        }

        return $exists;
    }
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;
		}
	}
829678
public function isMethodFailure(): bool
    {
        if ($this->isSuccess() || $this->allowedMethods === self::HTTP_METHOD_ANY) {
            return false;
        }

        return true;
    }
808621
public function isValidCallback(): bool
    {
        if (!$this->isValidHubSignature()) {
            return false;
        }

        $decodedBody = $this->getDecodedBody();

        $object = $decodedBody['object'] ?? null;
        $entry = $decodedBody['entry'] ?? null;

        return $object === 'page' && $entry !== null;
    }
1023809
public function isLoopback(): bool
    {
        if ($this->is_loopback === null) {
            $this->is_loopback = $this->isIn(static::$loopback_range);
        }

        return $this->is_loopback;
    }
1090806
protected function areRequirementsMet(): bool
    {
        return !$this->isSniffSuppressed(static::CODE_MISSING_RETURN_TYPE) && !$this->hasReturnType() &&
            !in_array($this->getFunctionName(), $this->methodsWithoutVoid);
    }
947833
public function isObjEditable()
    {
        $model = ($this->currentObj) ? $this->currentObj : $this->proto();
        $method = [ $model, 'isEditable' ];

        if (is_callable($method)) {
            return call_user_func($method);
        }

        return true;
    }
467645
public function isSafeInJS()
	{
		// List of callbacks that make a value safe to be used in a script, hardcoded for
		// convenience. Technically, there are numerous built-in PHP functions that would make an
		// arbitrary value safe in JS, but only a handful have the potential to be used as an
		// attribute filter
		$safeCallbacks = [
			'urlencode',
			'strtotime',
			'rawurlencode'
		];

		if (in_array($this->callback, $safeCallbacks, true))
		{
			return true;
		}

		return $this->isSafe('InJS');
	}
572736
public function check()
    {
        if (function_exists($this->functionName)) {
            return [EnvironmentCheck::OK, $this->functionName . '() exists'];
        }
        return [EnvironmentCheck::ERROR, $this->functionName . '() doesn\'t exist'];
    }
1089948
protected function checkBrowserOmniWeb()
    {
        if (stripos($this->_agent, 'omniweb') !== false) {
            $aresult = explode('/', stristr($this->_agent, 'omniweb'));
            $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : '');
            $this->setVersion($aversion[0]);
            $this->setBrowser(self::BROWSER_OMNIWEB);
            return true;
        }
        return false;
    }
573830
public function isSupported()
    {
        $mixer   = $this->getMixer();
        $request = $mixer->getRequest();

        if($request->getFormat() == 'html' && $request->isGet() && !$request->isAjax()) {
            return true;
        }

        return false;
    }
1067672
public function isNewVisitor(): bool
    {
        $referer = System::getContainer()->get('request_stack')->getCurrentRequest()->headers->get('referer');
        $schemeAndHttpHost = System::getContainer()->get('request_stack')->getCurrentRequest()->getSchemeAndHttpHost();

        return null === $referer || false === preg_match('$^'.$schemeAndHttpHost.'$i', $referer);
    }
445695
public static function isViewingHTMLPage()
    {
        if (!is_admin()) {
            return false;
        }
        if (!array_key_exists('SCRIPT_NAME', $_SERVER)) {
            return false;
        }
        
        $whitelisted_script_names = array(
            'wp-admin/post-new.php',
            'wp-admin/post.php',
            'wp-admin/edit.php',
        );
        $script_name = strstr($_SERVER['SCRIPT_NAME'], 'wp-admin');
        if (!in_array($script_name, $whitelisted_script_names)) {
            return false;
        }

        return true;
    }
850736
public function isWellFormed()
    {
        if (!is_array($this->decodedRawOutput)) {
            return false;
        }

        if (!isset($this->decodedRawOutput[0]) || !is_string($this->decodedRawOutput[0])) {
            return false;
        }

        if (!isset($this->decodedRawOutput[1]) || !is_array($this->decodedRawOutput[1])) {
            return false;
        }

        return true;
    }