Passed
Pull Request — master (#285)
by Tim
05:22 queued 03:08
created

RequestUnsupportedException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\SAML2\Exception\Protocol;
6
7
use SimpleSAML\SAML2\Constants;
8
9
/**
10
 * A SAML error indicating that the SAML responder or SAML authority does not support the request.
11
 *
12
 * @package simplesamlphp/saml2
13
 */
14
class RequestUnsupportedException extends AbstractProtocolException
15
{
16
    /**
17
     * RequestUnsupportedException constructor.
18
     *
19
     * @param string $responsible A string telling who is responsible for this error. Can be one of the following:
20
     *   - \SimpleSAML\SAML2\Constants::STATUS_RESPONDER: in case the error is caused by this SAML responder.
21
     *   - \SimpleSAML\SAML2\Constants::STATUS_REQUESTER: in case the error is caused by the SAML requester.
22
     * @param string|null $message A short message explaining why this error happened.
23
     */
24
    public function __construct(string $responsible, string $message = null)
25
    {
26
        parent::__construct($responsible, Constants::STATUS_REQUEST_UNSUPPORTED, $message);
27
    }
28
}
29