Code Duplication    Length = 7-7 lines in 2 locations

includes/shipping/flat-rate/class-wc-shipping-flat-rate.php 1 location

@@ 136-142 (lines=7) @@
133
		$has_costs = false; // True when a cost is set. False if all costs are blank strings.
134
		$cost      = $this->get_option( 'cost' );
135
136
		if ( $cost !== '' ) {
137
			$has_costs    = true;
138
			$rate['cost'] = $this->evaluate_cost( $cost, array(
139
				'qty'  => $this->get_package_item_qty( $package ),
140
				'cost' => $package['contents_cost'],
141
			) );
142
		}
143
144
		// Add shipping class costs
145
		$found_shipping_classes = $this->find_shipping_classes( $package );

includes/shipping/legacy-flat-rate/class-wc-shipping-legacy-flat-rate.php 1 location

@@ 165-171 (lines=7) @@
162
		$has_costs = false; // True when a cost is set. False if all costs are blank strings.
163
		$cost      = $this->get_option( 'cost' );
164
165
		if ( $cost !== '' ) {
166
			$has_costs    = true;
167
			$rate['cost'] = $this->evaluate_cost( $cost, array(
168
				'qty'  => $this->get_package_item_qty( $package ),
169
				'cost' => $package['contents_cost']
170
			) );
171
		}
172
173
		// Add shipping class costs
174
		$found_shipping_classes = $this->find_shipping_classes( $package );