SAMLDateTimeTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A validSAMLDateTime() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\SAML2\Assert;
6
7
use SimpleSAML\SAML2\Exception\ProtocolViolationException;
8
9
/**
10
 * @package simplesamlphp/saml2
11
 */
12
trait SAMLDateTimeTrait
13
{
14
    /**
15
     */
16
    protected static function validSAMLDateTime(string $value, string $message = ''): void
0 ignored issues
show
Unused Code introduced by
The parameter $message is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

16
    protected static function validSAMLDateTime(string $value, /** @scrutinizer ignore-unused */ string $message = ''): void

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
17
    {
18
        parent::validDateTime($value);
19
20
        parent::endsWith(
21
            $value,
22
            'Z',
23
            '%s is not a DateTime expressed in the UTC timezone using the \'Z\' timezone identifier.',
24
            ProtocolViolationException::class,
25
        );
26
    }
27
}
28