SingleSignOnService   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 12 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\SAML2\XML\md;
6
7
use SimpleSAML\SAML2\Assert\Assert;
8
use SimpleSAML\SAML2\Exception\ProtocolViolationException;
9
use SimpleSAML\SAML2\Type\SAMLAnyURIValue;
10
use SimpleSAML\XML\SchemaValidatableElementInterface;
11
use SimpleSAML\XML\SchemaValidatableElementTrait;
12
13
/**
14
 * Class representing an md:SingleSignOnService element.
15
 *
16
 * @package simplesamlphp/saml2
17
 */
18
final class SingleSignOnService extends AbstractEndpointType implements SchemaValidatableElementInterface
0 ignored issues
show
Bug introduced by
The type SimpleSAML\SAML2\XML\md\AbstractEndpointType was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
19
{
20
    use SchemaValidatableElementTrait;
21
22
23
    /**
24
     * SingleSignOnService constructor.
25
     *
26
     * This is an endpoint with one restriction: it cannot contain a ResponseLocation.
27
     *
28
     * @param \SimpleSAML\SAML2\Type\SAMLAnyURIValue $binding
29
     * @param \SimpleSAML\SAML2\Type\SAMLAnyURIValue $location
30
     * @param \SimpleSAML\SAML2\Type\SAMLAnyURIValue|null $unused
31
     * @param array $attributes
32
     * @throws \SimpleSAML\Assert\AssertionFailedException
33
     */
34
    public function __construct(
35
        SAMLAnyURIValue $binding,
36
        SAMLAnyURIValue $location,
37
        ?SAMLAnyURIValue $unused = null,
38
        array $attributes = [],
39
    ) {
40
        Assert::null(
41
            $unused,
42
            'The \'ResponseLocation\' attribute must be omitted for md:SingleSignOnService.',
43
            ProtocolViolationException::class,
44
        );
45
        parent::__construct($binding, $location, null, $attributes);
46
    }
47
}
48