Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 152-158 (lines=7) @@
149
		$has_costs = false; // True when a cost is set. False if all costs are blank strings.
150
		$cost      = $this->get_option( 'cost' );
151
152
		if ( $cost !== '' ) {
153
			$has_costs    = true;
154
			$rate['cost'] = $this->evaluate_cost( $cost, array(
155
				'qty'  => $this->get_package_item_qty( $package ),
156
				'cost' => $package['contents_cost']
157
			) );
158
		}
159
160
		// Add shipping class costs
161
		$found_shipping_classes = $this->find_shipping_classes( $package );

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

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