protected function getCalculator(string $shippingMethod): CalculatorInterface
    {
        $method = $this->getMethod($shippingMethod);

        if ($method === null) {
            return false;
        }

        /** @var CalculatorInterface $calculator */
        $calculator = $this->calculatorRegistry->get($method->getCalculator());

        return $calculator;
    }
protected function getCalculator(string $shippingMethod): CalculatorInterface
    {
        $method = $this->getMethod($shippingMethod);

        if ($method === null) {
            return false;
        }

        /** @var CalculatorInterface $calculator */
        $calculator = $this->calculatorRegistry->get($method->getCalculator());

        return $calculator;
    }
protected function getCalculator ( string $ shippingMethod ) : CalculatorInterface { $ method = $ this -> getMethod ( $ shippingMethod ) ; if ( $ method === null ) { return false ; } /** @var CalculatorInterface $calculator */ $ calculator = $ this -> calculatorRegistry -> get ( $ method -> getCalculator ( ) ) ; return $ calculator ; }
Retrieve Shipping Method Calculator

@param string $shippingMethod
@return CalculatorInterface|bool
Retrieve Shipping Method Calculator