Code Duplication    Length = 4-6 lines in 2 locations

includes/librairies/eav/attributes.class.php 2 locations

@@ 2007-2012 (lines=6) @@
2004
		/*
2005
		 * Display attribute option if applicable
2006
		 */
2007
		if ( $output_from == 'admin') {
2008
			$attribute_option_display = $attribute_def->backend_input=='select' && (strtolower( __(self::get_attribute_type_select_option_info($input['value'], 'value'), 'wpshop') ) == strtolower(__('yes', 'wpshop'))) ? '' : ' wpshopHide';
2009
2010
			$output['field'] .= '
2011
	<div class="attribute_option_'.$attribute_def->code.''.$attribute_option_display.'">'.self::get_attribute_option_fields($element_identifier, $attribute_def->code).'</div>';
2012
		}
2013
2014
		$output['field'] .= '</div>';
2015
		$output['field_definition'] = $input;
@@ 3203-3206 (lines=4) @@
3200
				$sub_tpl_component['ADMIN_VARIATION_DETAIL_DEF_ID'] = $attribute_output_def['id'];
3201
				$sub_tpl_component['ADMIN_VARIATION_DETAIL_DEF_LABEL'] = $attribute_output_def['label'];
3202
				$sub_tpl_component['ADMIN_VARIATION_DETAIL_DEF_INPUT'] = $field_output;
3203
				if( isset( $variations_attribute_parameters['post_id'] ) ) {
3204
					$attribute_option_display = $attribute_def->backend_input=='select' && (strtolower( __(self::get_attribute_type_select_option_info($attribute_output_def['value'], 'value'), 'wpshop') ) == strtolower( __('yes', 'wpshop') )) ? '' : ' wpshopHide';
3205
					$sub_tpl_component['ADMIN_VARIATION_DETAIL_DEF_INPUT'] .= '<div class="attribute_option_'.$attribute_def->code.''.$attribute_option_display.'">'.self::get_attribute_option_fields($variations_attribute_parameters['post_id'], $attribute_def->code).'</div>';
3206
				}
3207
				$tpl_component['ADMIN_VARIATION_DETAIL'] .= wpshop_display::display_template_element('wpshop_admin_variation_item_details_line', $sub_tpl_component, array(), 'admin');
3208
				unset($sub_tpl_component);
3209
			}