src/mako/validator/Validator.php
protected function expandFields(array $ruleSets): array
	{
		$expanded = [];

		foreach($ruleSets as $field => $ruleSet)
		{
			if($this->hasWilcard($field) === false)
			{
				$expanded = array_merge_recursive($expanded, [$field => $ruleSet]);

				continue;
			}

			if(!empty($fields = Arr::expandKey($this->input, $field)))
			{
				$this->saveOriginalFieldNames($fields, $field);

				$fields = array_fill_keys($fields, $ruleSet);
			}

			$expanded = array_merge_recursive($expanded, $fields);
		}

		return $expanded;
	}
protected function expandFields(array $ruleSets): array
	{
		$expanded = [];

		foreach($ruleSets as $field => $ruleSet)
		{
			if($this->hasWilcard($field) === false)
			{
				$expanded = array_merge_recursive($expanded, [$field => $ruleSet]);

				continue;
			}

			if(!empty($fields = Arr::expandKey($this->input, $field)))
			{
				$this->saveOriginalFieldNames($fields, $field);

				$fields = array_fill_keys($fields, $ruleSet);
			}

			$expanded = array_merge_recursive($expanded, $fields);
		}

		return $expanded;
	}
protected function expandFields ( array $ ruleSets ) : array { $ expanded = [ ] ; foreach ( $ ruleSets as $ field => $ ruleSet ) { if ( $ this -> hasWilcard ( $ field ) === false ) { $ expanded = array_merge_recursive ( $ expanded , [ $ field => $ ruleSet ] ) ; continue ; } if ( ! empty ( $ fields = Arr :: expandKey ( $ this -> input , $ field ) ) ) { $ this -> saveOriginalFieldNames ( $ fields , $ field ) ; $ fields = array_fill_keys ( $ fields , $ ruleSet ) ; } $ expanded = array_merge_recursive ( $ expanded , $ fields ) ; } return $ expanded ; }
Expands fields.

@param  array $ruleSets Rule sets
@return array
Expands fields .