public static function decode($rules = null)
	{
		$parser = new static;

		if (is_string($rules) && trim($rules) !== '') {
			$parser->rules = Collection::make(explode('|', $rules));
		} else {
			$parser->rules = new Collection;
		}

		return $parser;
	}
public static function decode($rules = null)
	{
		$parser = new static;

		if (is_string($rules) && trim($rules) !== '') {
			$parser->rules = Collection::make(explode('|', $rules));
		} else {
			$parser->rules = new Collection;
		}

		return $parser;
	}
public static function decode ( $ rules = null ) { $ parser = new static ; if ( is_string ( $ rules ) && trim ( $ rules ) !== '' ) { $ parser -> rules = Collection :: make ( explode ( '|' , $ rules ) ) ; } else { $ parser -> rules = new Collection ; } return $ parser ; }
Creates an instance for the given rules.

@param  null|string $rules

@return self
Creates an instance for the given rules .