src/mako/validator/rules/traits/I18nAwareTrait.php
protected function getI18nParameters(string $field, string $package): array
	{
		if(property_exists($this, 'i18nParameters'))
		{
			$parameters = array_map(function($value)
			{
				return is_array($value) ? implode(', ', $value) : $value;
			}, array_intersect_key(get_object_vars($this), array_flip($this->i18nParameters)));

			if(property_exists($this, 'i18nFieldNameParameters'))
			{
				foreach($this->i18nFieldNameParameters as $i18nField)
				{
					$parameters[$i18nField] = $this->translateFieldName($parameters[$i18nField], $package);
				}
			}

			return array_merge([$field], array_values($parameters));
		}

		return [$field];
	}
protected function getI18nParameters(string $field, string $package): array
	{
		if(property_exists($this, 'i18nParameters'))
		{
			$parameters = array_map(function($value)
			{
				return is_array($value) ? implode(', ', $value) : $value;
			}, array_intersect_key(get_object_vars($this), array_flip($this->i18nParameters)));

			if(property_exists($this, 'i18nFieldNameParameters'))
			{
				foreach($this->i18nFieldNameParameters as $i18nField)
				{
					$parameters[$i18nField] = $this->translateFieldName($parameters[$i18nField], $package);
				}
			}

			return array_merge([$field], array_values($parameters));
		}

		return [$field];
	}
protected function getI18nParameters ( string $ field , string $ package ) : array { if ( property_exists ( $ this , 'i18nParameters' ) ) { $ parameters = array_map ( function ( $ value ) { return is_array ( $ value ) ? implode ( ', ' , $ value ) : $ value ; } , array_intersect_key ( get_object_vars ( $ this ) , array_flip ( $ this -> i18nParameters ) ) ) ; if ( property_exists ( $ this , 'i18nFieldNameParameters' ) ) { foreach ( $ this -> i18nFieldNameParameters as $ i18nField ) { $ parameters [ $ i18nField ] = $ this -> translateFieldName ( $ parameters [ $ i18nField ] , $ package ) ; } } return array_merge ( [ $ field ] , array_values ( $ parameters ) ) ; } return [ $ field ] ; }
Gets the i18n parameters.

@param  string $field   Field name
@param  string $package Package prefix
@return array
Gets the i18n parameters .