ProtocolViolationException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

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