/** * Whether the state is valid. * * @param Context $context * @return boolean */ public function isValid(Context $context) { $paymentMethod = $context->getPaymentMethod(); return empty($paymentMethod) === false; }