Checks system requirements status

@return bool
176929
public function getSysReqStatus()
    {
        if ($this->_blSysReqStatus == null) {
            $this->_blSysReqStatus = true;
            $this->getSystemInfo();
            $this->checkCollation();
        }

        return $this->_blSysReqStatus;
    }
1319126
public function isEsiDown(): bool
    {

        // Check if we may have hit an error threshold
        if ($this->isEsiRateLimited()) return true;

        // Get the latest ESI status.
        $status = Cache::remember('esi_db_status', 1, function () {

            return EsiStatus::latest()->first();
        });

        // If we don't have a status yet, assume everything is ok.
        if (! $status) return false;

        // If the data is too old, return false by default.
        // Not being able to ping ESI could be indicative
        // of many other problems.
        if ($status->created_at->lte(carbon('now')->subHours(2)))
            return true;

        // If the status is OK, yay.
        if ($status->status == 'ok')
            return false;

        return true;
    }
1160887
protected function checkRequirements()
    {
        $statusRepository = $this->container->get('open_orchestra_model.repository.status');
        $this->abortIf((null === $statusRepository->findOnebyAutoUnpublishTo()), "Require offline status");
    }
724422
public static function is_system_configured() {
        global $DB;

        // First, check if the plugin is disabled.
        $processor = $DB->get_record('message_processors', array('name' => 'airnotifier'), '*', MUST_EXIST);
        if (!$processor->enabled) {
            return 0;
        }

        // Then, check if the plugin is completly configured.
        $manager = new message_airnotifier_manager();
        return (int) $manager->is_system_configured();
    }
759430
protected function getStatus()
    {
        if (!$this->getModuleSetting('status')) {
            return false;
        }

        if ($this->getModuleSetting('test')) {
            return $this->getModuleSetting('test_key') && $this->getModuleSetting('test_public_key');
        }

        return $this->getModuleSetting('live_key') && $this->getModuleSetting('live_public_key');
    }
195582
public static function are_requirements_met() {
        if (self::$requirementsmet === null) {
            $requirementsmet = self::test_unoconv_path()->status === self::UNOCONVPATH_OK;
            $requirementsmet = $requirementsmet && self::is_minimum_version_met();
            self::$requirementsmet = $requirementsmet;
        }

        return self::$requirementsmet;
    }
1069676
protected function validateRequirementsInstall()
    {
        if ($this->isExcluded('requirements')) {
            return null;
        }

        if ($this->config->isInitialized()) {
            $error = $this->translation->text('System already installed');
            $this->setError('installed', $error);
            return false;
        }

        $requirements = $this->install->getRequirements();
        $errors = $this->install->getRequirementErrors($requirements);

        if (empty($errors['danger'])) {
            return true;
        }

        $messages = array();
        $messages[] = $this->translation->text('Please fix all critical errors in your environment');

        foreach ($requirements as $items) {
            foreach ($items as $name => $info) {
                if (in_array($name, $errors['danger'])) {
                    $status = empty($info['status']) ? $this->translation->text('No') : $this->translation->text('Yes');
                    $messages[] = " {$info['message']} - $status";
                }
            }
        }

        $this->setError('requirements', implode(PHP_EOL, $messages));
        return false;
    }
631318
public function valid() {
        if (!isset($this->za)) {
            return false;
        }

        // Skip over unwanted system files (get_info will return false).
        while (!$this->get_info($this->pos) && $this->pos < $this->za->numFiles) {
            $this->next();
        }

        // No files left - we're at the end.
        if ($this->pos >= $this->za->numFiles) {
            return false;
        }

        return true;
    }
717544
public function valid()
    {
        if ($this->container['characterId'] === null) {
            return false;
        }
        if ($this->container['joinTime'] === null) {
            return false;
        }
        if ($this->container['role'] === null) {
            return false;
        }
        $allowed_values = ["fleet_commander", "wing_commander", "squad_commander", "squad_member"];
        if (!in_array($this->container['role'], $allowed_values)) {
            return false;
        }
        if ($this->container['roleName'] === null) {
            return false;
        }
        if ($this->container['shipTypeId'] === null) {
            return false;
        }
        if ($this->container['solarSystemId'] === null) {
            return false;
        }
        if ($this->container['squadId'] === null) {
            return false;
        }
        if ($this->container['takesFleetWarp'] === null) {
            return false;
        }
        if ($this->container['wingId'] === null) {
            return false;
        }
        return true;
    }
420072
public function check()
    {
        $this->goodPools = getInstance()->sysCache->get($this->name) ?? [];
        if (!$this->goodPools) {
            return false;
        }

        $nowPools = $this->getAllTargets();
        $newPools = array_keys($this->goodPools);
        $loses    = array_diff($nowPools, $newPools);

        if (!empty($loses)) {
            foreach ($loses as $lost) {
                $this->removeTarget($lost);
            }
            writeln('Redis Proxy Remove ( ' . implode(',', $loses) . ' ) from Cluster');
        }

        $adds = array_diff($newPools, $nowPools);
        if (!empty($adds)) {
            foreach ($adds as $add) {
                $this->addTarget($add, $this->pools[$add]);
            }
            writeln('Redis Proxy Add ( ' . implode(',', $adds) . ' ) into Cluster');
        }

        return true;
    }
1221854
public function isRunning()
    {
        if ($this->process === null) {
            return false;
        }

        $status = $this->getFreshStatus();

        return $status !== null ? $status['running'] : false;
    }
1346268
public function valid()
    {
        if ($this->container['maxDockableShipVolume'] === null) {
            return false;
        }
        if ($this->container['name'] === null) {
            return false;
        }
        if ($this->container['officeRentalCost'] === null) {
            return false;
        }
        if ($this->container['reprocessingEfficiency'] === null) {
            return false;
        }
        if ($this->container['reprocessingStationsTake'] === null) {
            return false;
        }
        if ($this->container['services'] === null) {
            return false;
        }
        if ($this->container['stationId'] === null) {
            return false;
        }
        if ($this->container['systemId'] === null) {
            return false;
        }
        if ($this->container['typeId'] === null) {
            return false;
        }
        return true;
    }
473874
public function isSuccessful()
    {
        if (!$this->testMdSignatures()) {
            return false;
        }

        return in_array($this->getStatus(), [self::STATUS_PENDING, self::STATUS_PROCESSED]);
    }
35740
private function requiredSystemCommands()
    {

        // todo fix command existence in windows os
        return true;


        // Programs needed in $PATH
        $required_commands = ['git', 'rsync','php', 'composer'];

        $missing = [];
        foreach ($required_commands as $command) {
            $this->process->setCommandLine('which ' . $command);
            $this->process->setTimeout(null);
            $this->process->run();

            if (!$this->process->isSuccessful()) {
                $missing[] = $command;
            }
        }

        if (count($missing)) {
            asort($missing);

            $this->console->error('Commands not found: ' . implode(', ', $missing));
            $this->errors = true;
        }
    }
112338
public function isAvailable()
    {
        // check if apache module is installed
        if (function_exists('apache_get_modules')) {
            foreach (apache_get_modules() as $name) {
                if (strpos($name, 'geoip') !== false) {
                    return true;
                }
            }
        }

        $available = !empty($_SERVER[self::TEST_SERVER_VAR])
            || !empty($_SERVER[self::TEST_SERVER_VAR_ALT])
            || !empty($_SERVER[self::TEST_SERVER_VAR_ALT_IPV6])
        ;

        if ($available) {
            return true;
        }

        // if not available return message w/ extra info
        if (!function_exists('apache_get_modules')) {
            return Piwik::translate('General_Note') . ':&nbsp;' . Piwik::translate('UserCountry_AssumingNonApache');
        }

        $message = "<strong>" . Piwik::translate('General_Note') . ':&nbsp;'
            . Piwik::translate('UserCountry_FoundApacheModules')
            . "</strong>:<br/><br/>\n<ul style=\"list-style:disc;margin-left:24px\">\n";
        foreach (apache_get_modules() as $name) {
            $message .= "<li>$name</li>\n";
        }
        $message .= "</ul>";
        return $message;
    }
605141
public function system_updates()
    {
        if (file_exists($this->tmp_path.'/check-updates')) {
            unlink($this->tmp_path.'/check-updates');
        }

        if ($this->host_os === 'WINDOWS') {
            $updSess = new \COM("Microsoft.Update.Session");
            $updSrc = $updSess->CreateUpdateSearcher();
            $result = $updSrc->Search('IsInstalled=0 and Type=\'Software\' and IsHidden=0');
            return !empty($result->Updates->Count) ? '1' : '0';
        }

        if ($this->distro() === 'UBUNTU') {
            $get_updates = shell_exec('apt-get -s dist-upgrade');
            if (preg_match('/^(\d+).+upgrade.+(\d+).+newly\sinstall/m', $get_updates, $matches)) {
                $result = (int) $matches[1] + (int) $matches[2];
            } else {
                $result = 0;
            }
            return !empty($result) ? '1' : '0';
        }

        if ($this->distro() === 'CENTOS') {
            exec('yum check-update', $output, $exitCode);
            return ($exitCode == 100) ? '1' : '0';
        }
        return '-1';
    }
799845
public function checkKernel()
    {
        $content = file_get_contents($this->kernelURL);

        $out = JSON::decode($content, true);

        if ($this->compaireSecondary($out->version, $this->kernel->version)
         && ($out->sha != $this->kernel->sha)) {
            return $out;
        } else {
            return false;
        }
    }