original_string: protected function parse_string_rules( $rules ) {
  		$split_rules = explode( '|', $rules );
  		$parse_rules = [];
  
  		foreach ( $split_rules as $rule ) {
  			$parameters = [];
  
  			// Format rule and parameters follows {rule}:{parameters}.
  			if ( strpos( $rule, ':' ) !== false ) {
  				list( $rule, $parameter ) = explode( ':', $rule, 2 );
  
  				$parameter = false !== strpos( $parameter, ',' )
  					? str_getcsv( $parameter )
  					: [ $parameter ];
  
  				$parameters = $this->wrap_parameters( $rule, $parameter );
  			}
  
  			$parse_rules[] = [ $this->normalize( $rule ), $parameters ];
  		}
  
  		return $parse_rules;
  	}
code: protected function parse_string_rules( $rules ) {
  		$split_rules = explode( '|', $rules );
  		$parse_rules = [];
  
  		foreach ( $split_rules as $rule ) {
  			$parameters = [];
  
  			// Format rule and parameters follows {rule}:{parameters}.
  			if ( strpos( $rule, ':' ) !== false ) {
  				list( $rule, $parameter ) = explode( ':', $rule, 2 );
  
  				$parameter = false !== strpos( $parameter, ',' )
  					? str_getcsv( $parameter )
  					: [ $parameter ];
  
  				$parameters = $this->wrap_parameters( $rule, $parameter );
  			}
  
  			$parse_rules[] = [ $this->normalize( $rule ), $parameters ];
  		}
  
  		return $parse_rules;
  	}
code_tokens: protected function parse_string_rules ( $ rules ) { $ split_rules = explode ( '|' , $ rules ) ; $ parse_rules = [ ] ; foreach ( $ split_rules as $ rule ) { $ parameters = [ ] ; // Format rule and parameters follows {rule}:{parameters}. if ( strpos ( $ rule , ':' ) !== false ) { list ( $ rule , $ parameter ) = explode ( ':' , $ rule , 2 ) ; $ parameter = false !== strpos ( $ parameter , ',' ) ? str_getcsv ( $ parameter ) : [ $ parameter ] ; $ parameters = $ this -> wrap_parameters ( $ rule , $ parameter ) ; } $ parse_rules [ ] = [ $ this -> normalize ( $ rule ) , $ parameters ] ; } return $ parse_rules ; }
docstring: Parse a string based rules.
  
  @param  string $rules String rules set.
  @return array
docstring_tokens: Parse a string based rules .