Checks if all required properties are set
@return bool
@throws \Runn\Core\Exceptions
178091
protected function checkRequired()
    {
        $errors = new Exceptions();
        foreach ($this->getRequiredKeys() as $required) {
            if (!isset($this->$required)) {
                $errors->add(new Exception('Required property "' . $required . '" is missing'));
            }
        }
        if (!$errors->empty()) {
            throw $errors;
        }
        return true;
    }
628265
protected function canBuild()
    {
        if (!empty($this->requiredParams)) {
            $this->builder->build($this->requiredParams, $this->params);

            if ($this->builder->getErrors()) {
                return false;
            }
            return $this->builder->getParams();
        }
        return true;
    }
120729
public function isEmpty()
    {
        foreach ($this->properties as $property => $default) {
            if ($property == 'path') {
                if (count($this->path)) {
                    return false;
                }
                continue;
            }

            if ($this->$property) {
                return false;
            }
        }

        return true;
    }
725555
public function valid()
    {
        if (!self::$session) {
            Exception::i()->setMessage(self::ERROR_NOT_STARTED)->trigger();
        }

        return isset($_SESSION[$this->key()]);
    }
450164
public function isValid($property = null) {
		$validators = $this->getValidators();
		
		if ($validators === null) {
			return true;
		}
		
		if ($property === null) {
			$data = &$this->_data;
		} else if (is_array($property)) {
			$data = array_intersect_key($this->_data, array_flip($property));

			if (empty($data)) {
				throw new Exception('Specified properties are absent');
			}
		} else {
			if (! isset($this->_data[$property])) {
				throw new Exception('Specified property is absent');
			}
			
			$data = [$property => $this->_data[$property]];
		}
		
		$valid    = true;
		$messages = [];
		
		foreach ($data as $name => $value) {
			if (! isset($validators[$name])) {
				continue;
			}
			
			foreach ($validators[$name] as $validator) {
				if ($validator->isValid($value)) {
					continue;
				}
				
				if (isset($messages[$name])) {
					$messages[$name] = array_merge($messages[$name], $validator->getMessages());
				} else {
					$messages[$name] = $validator->getMessages();
				}

				$valid = false;
				
			}
			
		}
		
		$this->_validatorsMessages = $messages;
		
		return $valid;
	}
472862
public function requirements_met() {
		$met = true;

		foreach ( $this->requirements as $requirement ) {
			$met = $met && $requirement->is_met();
		}

		return $met;
	}
999058
public function valid()
    {
        // initialize/refresh cursor
        if ($this->cursor != 0 && !isset($this->elements[$this->index])) {
            $this->scan();
        }

        return isset($this->elements[$this->index]);
    }
863432
protected function checkRequirements()
    {
        $required_properties = array('_buildFile');
        foreach ($required_properties as $required_property) {
            if (empty($this->$required_property)) {
                throw new \BuildException(
                    "Missing required property '" . $required_property . "'."
                );
            }
        }
    }
1035371
private function assertRequiredExtensionsIsPresent()
    {
        $extensionRequires = $this->config->get('extensions', 'requires');
        if (true === empty($extensionRequires)) {
            return;
        }

        $extensions = [];
        foreach ($extensionRequires as $key => $value) {
            if (false === \extension_loaded($value)) {
                $extensions[] = $value;
            }
        }

        if (false === empty($extensions)) {
            throw new RuntimeException(
                sprintf(
                    'Could not load extension: %s. You must add extensions above before build this extension.',
                    implode(', ', $extensions)
                )
            );
        }
    }
1055734
public function isValid()
    {
        $value = $this->field->getValue();

        if (is_array($value) || is_object($value)) {
            throw new \Exception("This validator only works on scalar types!");
        }

        // required but not given
        if ($this->required && $value == null) {
            return false;
        } // if the field is not required and the value is empty, then it's also valid
        elseif (!$this->required && $value == "") {
            return true;
        }

        // check if the field contains a valid number value.
        if (!preg_match('/^-?\d+$/', $value)) {
            return false;
        }

        // check if the value is not to low.
        if ($this->min !== null) {
            if ($value < $this->min) {
                return false;
            }
        }

        // check if the value is not to high.
        if ($this->max !== null) {
            if ($value > $this->max) {
                return false;
            }
        }

        return true;
    }
92222
public function isMet()
    {
        if ($this->isDisabled()) {
            return $this->getReturnValueIfIsDisabled();
        } else {
            if ($this->conditions->count() == 0) {
                throw new RuntimeException(
                    'No condition set in this requirement.'
                );
            }

            foreach ($this->conditions as $condition) {
                if (!$condition->isMet()) {
                    return false;
                }
            }

            return true;
        }
    }
986681
protected function checkSettings()
    {
        $io = $this->event->getIO();

        if ($this->disabled) {
            $io->write('<info>[C33sConstructionKitBundle] C33sConstructionKit is disabled</info>');

            return false;
        }

        if (!is_dir($this->appDir)) {
            $currentDir = getcwd();
            $io->write("<warning>[C33sConstructionKitBundle] The symfony-app-dir {$this->appDir} specified in composer.json was not found in {$currentDir}. Cannot generate building blocks file.</warning>");

            return false;
        }

        return true;
    }
597952
public function isRequired()
    {
        $result = $this->required;
        if (is_callable($result)) {
            $result = $result($this);
        }

        return (bool) $result;
    }
493773
protected function areRequirementsMet(): bool
    {
        return (bool) $this->uses = ClassHelper::getTraitUsePointers($this->getFile(), $this->getStackPos());
    }
74605
public function isEmpty() {

        // return true if all properties are null
        return (is_null($this->name) && is_null($this->ANSICode) && is_null($this->XTermCode) && is_null($this->RGB));

    }
684055
public function isRequired()
    {
        if (!empty($this->validation)) {
            foreach ($this->validation as $validation) {
                if ($validation instanceof Validation\Required) {
                    return true;
                }
            }
        }

        return false;
    }
155192
public function isValid() : bool
   {

      if ( $this->_support->hasAttribute( $this->_requiredAttributeName ) )
      {
         return true;
      }

      return $this->_support->hasAttribute( $this->_altAttributeName );

   }