src/LightSaml/Action/Profile/Outbound/Message/SignMessageAction.php
private function shouldSignMessage(ProfileContext $context)
    {
        $message = $context->getOutboundMessage();

        if ($message instanceof LogoutRequest) {
            return true;
        }

        $trustOptions = $context->getTrustOptions();

        if ($message instanceof AuthnRequest) {
            return $trustOptions->getSignAuthnRequest();
        } elseif ($message instanceof Response) {
            return $trustOptions->getSignResponse();
        }

        throw new \LogicException(sprintf('Unexpected message type "%s"', get_class($message)));
    }
private function shouldSignMessage(ProfileContext $context)
    {
        $message = $context->getOutboundMessage();

        if ($message instanceof LogoutRequest) {
            return true;
        }

        $trustOptions = $context->getTrustOptions();

        if ($message instanceof AuthnRequest) {
            return $trustOptions->getSignAuthnRequest();
        } elseif ($message instanceof Response) {
            return $trustOptions->getSignResponse();
        }

        throw new \LogicException(sprintf('Unexpected message type "%s"', get_class($message)));
    }
@param ProfileContext $context

@return bool