protected function getValidationRulesSchemaRequired($validationRules)
	{
		$required = [];

		foreach ($validationRules as $propertyName => $rulesString) {
			$propertyRules = explode('|', $rulesString);

			// Parse property rules to get format/schema
			foreach ($propertyRules as $rule) {
				$explodedRule = explode(':', $rule);
				$ruleName = $explodedRule[0];
				if ($ruleName == 'required') {
					// Check if type is handled
					$schema = $this->getPropertyValidationRulesSchema(
						$propertyRules,
						'Validation rules for property "' . $propertyName . '"'
					);
					if (!is_null($schema->type)) {
						$required[] = $propertyName;
					}
				}
			}
		}

		return count($required) > 0 ? $required : null;
	}
protected function getValidationRulesSchemaRequired($validationRules)
	{
		$required = [];

		foreach ($validationRules as $propertyName => $rulesString) {
			$propertyRules = explode('|', $rulesString);

			// Parse property rules to get format/schema
			foreach ($propertyRules as $rule) {
				$explodedRule = explode(':', $rule);
				$ruleName = $explodedRule[0];
				if ($ruleName == 'required') {
					// Check if type is handled
					$schema = $this->getPropertyValidationRulesSchema(
						$propertyRules,
						'Validation rules for property "' . $propertyName . '"'
					);
					if (!is_null($schema->type)) {
						$required[] = $propertyName;
					}
				}
			}
		}

		return count($required) > 0 ? $required : null;
	}
protected function getValidationRulesSchemaRequired ( $ validationRules ) { $ required = [ ] ; foreach ( $ validationRules as $ propertyName => $ rulesString ) { $ propertyRules = explode ( '|' , $ rulesString ) ; // Parse property rules to get format/schema
 foreach ( $ propertyRules as $ rule ) { $ explodedRule = explode ( ':' , $ rule ) ; $ ruleName = $ explodedRule [ 0 ] ; if ( $ ruleName == 'required' ) { // Check if type is handled
 $ schema = $ this -> getPropertyValidationRulesSchema ( $ propertyRules , 'Validation rules for property "' . $ propertyName . '"' ) ; if ( ! is_null ( $ schema -> type ) ) { $ required [ ] = $ propertyName ; } } } } return count ( $ required ) > 0 ? $ required : null ; }
Get schema required array from validation rules or null if no required fields

@param mixed[] $validationRules
@return string[]|null
Get schema required array from validation rules or null if no required fields