ProtocolViolationException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 16
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\SAML11\Exception;
6
7
/**
8
 * This exception may be raised when a violation of the SAML 1.1 specification is detected
9
 *
10
 * @package simplesamlphp/saml11
11
 */
12
class ProtocolViolationException extends RuntimeException
13
{
14
    /**
15
     * @param string $message
16
     */
17
    public function __construct(string $message = '')
18
    {
19
        if ($message === '') {
20
            if (defined('static::DEFAULT_MESSAGE')) {
21
                $message = static::DEFAULT_MESSAGE;
22
            } else {
23
                $message = 'A violation of the SAML 1.1 protocol occurred.';
24
            }
25
        }
26
27
        parent::__construct($message);
28
    }
29
}
30