public function calculate(float $weight, string $shipping_provider, float $price): float 	{ 		$settings = app(GeneralSettings::class); 		$shipping_provider = strtolower($shipping_provider);  		if ($price >= ($settings->{'free_shipping_' . $shipping_provider . '_above_price'} ?? PHP_INT_MAX)) { 			return 0.00; 		}  		if ($weight <= $settings->{'free_shipping_' . $shipping_provider}) { 			return 0.00; 		}  		$weights = [ 			2 => $settings->{'shipping_cost_up_to_2_' . $shipping_provider}, 			5 => $settings->{'shipping_cost_up_to_5_' . $shipping_provider}, 			10 => $settings->{'shipping_cost_up_to_10_' . $shipping_provider}, 			15 => $settings->{'shipping_cost_up_to_15_' . $shipping_provider}, 			20 => $settings->{'shipping_cost_up_to_20_' . $shipping_provider}, 			25 => $settings->{'shipping_cost_up_to_25_' . $shipping_provider}, 			30 => $settings->{'shipping_cost_up_to_30_' . $shipping_provider}, 			PHP_INT_MAX => $settings->{'shipping_cost_up_to_30_' . $shipping_provider}, // for weights greater than 30 		];  		foreach ($weights as $threshold => $cost) { 			if ($weight <= $threshold) { 				return $cost; 			} 		}  		return 0.00; 	}