Check all requirement.

@return bool
434466
public function check(): bool
    {
        return $this->installable = $this->items->filter(function ($specification) {
            return $specification->check() === false && $specification->optional() === false;
        })->isEmpty();
    }
1233769
final public function check()
	{
		if ( ! $this->perform_check())
		{
			\Auth::_unregister_verified($this);
			return false;
		}

		\Auth::_register_verified($this);
		return true;
	}
1047767
public function mustAnalyse(){
        if($this->controller) {
            return true;
        }
        $url = $this->pathinfo;

        $sys = Config::$o;
        if(!$url) {
            $url = $sys->default_index;
        }
        $url = explode('/', $url);
        switch (count($url)) {
            case 0:
            case 1:
                $this->controller = $url[0];
                break;
            case 2:
                $this->controller = $url[0];
                $this->function = $url[1];
                break;
            default:
                $this->module = $url[0];
                $this->controller = $url[1];
                $this->function = $url[2];
                break;
        }
        return $this;
    }
684055
public function isRequired()
    {
        if (!empty($this->validation)) {
            foreach ($this->validation as $validation) {
                if ($validation instanceof Validation\Required) {
                    return true;
                }
            }
        }

        return false;
    }
11093
public static function are_requirements_met() {
        $issuerid = get_config('fileconverter_googledrive', 'issuerid');
        if (empty($issuerid)) {
            return false;
        }

        $issuer = \core\oauth2\api::get_issuer($issuerid);
        if (empty($issuer)) {
            return false;
        }

        if (!$issuer->get('enabled')) {
            return false;
        }

        if (!$issuer->is_system_account_connected()) {
            return false;
        }

        return true;
    }
770864
public function hasPhpIniConfigIssue()
    {
        foreach ($this->requirements as $req) {
            if (!$req->isFulfilled() && $req instanceof PhpIniRequirement) {
                return true;
            }
        }

        return false;
    }
314682
public function check()
    {
        $pass = true;
        foreach ($this->_rules as $rule) {
            if ($rule->lhs() instanceof BasePackage) {
                $package = $rule->lhs();
            } else {
                $package = PackageFactory::create((string)$rule->lhs());
            }

            if (!$package->versionMatch($rule->rhs())) {
                $this->_fail($rule);
                $pass = false;
            } else {
                $this->_pass($rule);
            }
        }

        $this->_checked = true;

        return $pass;
    }
141544
public function check()
    {

        $config = $this->getConfig();

        if (isset($config['ext'])) {
            $this->setExt($config['ext']);
        }

        if (isset($config['folder'])) {

            $folder = $config['folder'];
            $this->setFolder($folder);


            if(!$this->getFileSystem()->exists($folder))
            {
                $this->getFileSystem()->createDir($folder);
                chmod($folder, 0777);
            }
        }else{

            return false;
        }

        // we have do something else

        if (function_exists('gzcompress') && function_exists('gzuncompress')) {
            return true;
        }
    }
403380
public function verify()
    {
        $phpversion = phpversion();
        $extensions = get_loaded_extensions();
        $ini        = array_only(ini_get_all(), ['max_execution_time', 'max_file_uploads', 'max_input_time', 'post_max_size', 'upload_max_filesize']);

        $return              = [
            'version'    => $phpversion,
            'transports' => implode(', ', stream_get_transports()),
            'filters'    => implode(', ', stream_get_filters()),
            'doc_root'   => getcwd(),
            'extensions' => $extensions,
            'ini'        => $ini,
        ];
        $this->configuration = $return;
        $this->validate($return);
        return $return;
    }
486631
public function checkRequirements(): array
    {
        $results = [];

        $this->checkVersion($results, 'php','php', $this->requires['php'], PHP_VERSION);
        $this->checkVersion($results, 'grav', 'grav', $this->requires['grav'], GRAV_VERSION);
        $this->checkPlugins($results, $this->requires['plugins']);

        return $results;
    }
200470
public function validate() {
		$required = array_filter($this->orig, function($spec) {
			return $spec[3] & self::REQUIRED;
		});
		foreach ($required as $req) {
			if ($req[3] & self::MULTI) {
				if (is_array($this[$req[0]])) {
					continue;
				}
			} elseif (strlen($this[$req[0]])) {
				continue;
			}
			if (is_numeric($req[0])) {
				yield sprintf("Argument <%s> is required", $req[1]);
			} else {
				yield sprintf("Option --%s is required", $req[1]);
			}
		}
	}
1082702
public function check() {
        if ($this->_exist) {
            foreach ($this->_constraints as $constraint) {
                switch ($constraint['type']) {
                    case self::ACCEPT:
                        if (!is_array($this->_data[$this->_field]['type'])) {
                            $this->_data[$this->_field]['type'] = [$this->_data[$this->_field]['type']];
                        }

                        foreach ($this->_data[$this->_field]['type'] as $value) {
                            if ($value != '') {
                                if (!in_array($value, $constraint['value'])) {
                                    array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraint['message']]);
                                }
                            }
                        }
                        break;

                    case self::EXTENSION:
                        if (!is_array($this->_data[$this->_field]['name'])) {
                            $this->_data[$this->_field]['name'] = [$this->_data[$this->_field]['name']];
                        }

                        foreach ($this->_data[$this->_field]['name'] as $value) {
                            if ($value != '') {
                                if (!in_array(pathinfo($value)['extension'], $constraint['value'])) {
                                    array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraint['message']]);
                                }
                            }
                        }
                        break;

                    case self::SIZEMIN:
                        if (!is_array($this->_data[$this->_field]['size'])) {
                            $this->_data[$this->_field]['size'] = [$this->_data[$this->_field]['size']];
                        }

                        foreach ($this->_data[$this->_field]['size'] as $value) {
                            if ($value != 0) {
                                if ($value < $constraint['value']) {
                                    array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraint['message']]);
                                }
                            }
                        }
                        break;

                    case self::SIZEMAX:
                        if (!is_array($this->_data[$this->_field]['size'])) {
                            $this->_data[$this->_field]['size'] = [$this->_data[$this->_field]['size']];
                        }

                        foreach ($this->_data[$this->_field]['size'] as $value) {
                            if ($value != 0) {
                                if ($value > $constraint['value']) {
                                    array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraint['message']]);
                                }
                            }
                        }
                        break;

                    case self::SIZEBETWEEN:
                        if (!is_array($this->_data[$this->_field]['size'])) {
                            $this->_data[$this->_field]['size'] = [$this->_data[$this->_field]['size']];
                        }

                        foreach ($this->_data[$this->_field]['size'] as $value) {
                            if ($value != 0) {
                                if ($value < $constraint['value'][0] || $value > $constraint['value'][1]) {
                                    array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraint['message']]);
                                }
                            }
                        }
                        break;

                    case self::COUNT:
                        if (!is_array($this->_data[$this->_field]['name'])) {
                            $this->_data[$this->_field]['name'] = [$this->_data[$this->_field]['name']];
                        }

                        if (count($this->_data[$this->_field]['name']) != $constraint['value']) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraint['message']]);
                        }
                        break;

                    case self::COUNTMIN:
                        if (!is_array($this->_data[$this->_field]['name'])) {
                            $this->_data[$this->_field]['name'] = [$this->_data[$this->_field]['name']];
                        }

                        if (count($this->_data[$this->_field]['name']) < $constraint['value']) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraint['message']]);
                        }
                        break;

                    case self::COUNTMAX:
                        if (!is_array($this->_data[$this->_field]['name'])) {
                            $this->_data[$this->_field]['name'] = [$this->_data[$this->_field]['name']];
                        }

                        if (count($this->_data[$this->_field]['name']) > $constraint['value']) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraint['message']]);
                        }
                        break;

                    case self::COUNTIN:
                        if (!is_array($this->_data[$this->_field]['name'])) {
                            $this->_data[$this->_field]['name'] = [$this->_data[$this->_field]['name']];
                        }

                        if (!in_array(count($this->_data[$this->_field]['name']), $constraint['value'])) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraint['message']]);
                        }
                        break;

                    case self::CUSTOM:
                        /** @var object[] $constraints */
                        if ($constraints['value']->filter() == false) {
                            array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['value']->error()]);
                        }
                        break;
                }
            }
        }
    }
1179053
def _check_service_requirements(self):
        """"""
        missing = self.services.get_missing_services(
            self.required_services.keys()
        )
        if missing:
            self.log.critical(
                "Following services are required and missing: {}".format(
                    ', '.join(missing)
                )
            )
            return False
        return True
848616
def _has_requirements(self):
        
        self._closed()

        return any([self.has_workflow_step, self.has_scatter_requirement,
                   self.has_multiple_inputs])
370852
public function isAquired() {
        if (isset(self::$hFiles[$this->filename]))
            return is_resource(self::$hFiles[$this->filename]);
        return false;
    }
287925
public function check()
    {
        $currentValue = (int) ini_get($this->setting);
        
        $return = false;
        foreach($this->requiredValues as $key => $requiredValue){
            $this->requiredValues[$key]['isValid'] = version_compare($currentValue, $requiredValue['requiredValue'], $requiredValue['operator']);
            
            if($this->requiredValues[$key]['isValid']){
                $return = true;
            }
        }
        
        return $return;
    }
283545
public function check(array $requirements)
    {
        $results = [];

        foreach($requirements as $type => $requirement)
        {
            switch ($type) {
                // check php requirements
                case 'php':
                    foreach($requirements[$type] as $requirement)
                    {
                        $results['requirements'][$type][$requirement] = true;

                        if(!extension_loaded($requirement))
                        {
                            $results['requirements'][$type][$requirement] = false;

                            $results['errors'] = true;
                        }
                    }
                    break;
                // check apache requirements
                case 'apache':
                    foreach ($requirements[$type] as $requirement) {
                        // if function doesn't exist we can't check apache modules
                        if(function_exists('apache_get_modules'))
                        {
                            $results['requirements'][$type][$requirement] = true;

                            if(!in_array($requirement,apache_get_modules()))
                            {
                                $results['requirements'][$type][$requirement] = false;

                                $results['errors'] = true;
                            }
                        }
                    }
                    break;
            }
        }

        return $results;
    }