original_string: public static function transform_to_object( &$field ) {
  		if ( 1 !== count( $field['value'] ) ) {
  			return $field['value'];
  		}
  
  		$as_array = ! ( 1 === $field['min'] && 1 === $field['max'] );
  		$as_array = apply_filters( Filter::REPEATER_AS_ARRAY, $as_array, $field );
  
  		$field['value'] = $as_array ? $field['value'] : $field['value'][0];
  	}
code: public static function transform_to_object( &$field ) {
  		if ( 1 !== count( $field['value'] ) ) {
  			return $field['value'];
  		}
  
  		$as_array = ! ( 1 === $field['min'] && 1 === $field['max'] );
  		$as_array = apply_filters( Filter::REPEATER_AS_ARRAY, $as_array, $field );
  
  		$field['value'] = $as_array ? $field['value'] : $field['value'][0];
  	}
code_tokens: public static function transform_to_object ( & $ field ) { if ( 1 !== count ( $ field [ 'value' ] ) ) { return $ field [ 'value' ] ; } $ as_array = ! ( 1 === $ field [ 'min' ] && 1 === $ field [ 'max' ] ) ; $ as_array = apply_filters ( Filter :: REPEATER_AS_ARRAY , $ as_array , $ field ) ; $ field [ 'value' ] = $ as_array ? $ field [ 'value' ] : $ field [ 'value' ] [ 0 ] ; }
docstring: Transform to an object if the filter is set and there is only 1 item.
  
  @param array $field Field.
  @return mixed
docstring_tokens: Transform to an object if the filter is set and there is only 1 item .