NameIDMappingService   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 29
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\Type\SAMLAnyURIValue;
9
use SimpleSAML\XML\SchemaValidatableElementInterface;
10
use SimpleSAML\XML\SchemaValidatableElementTrait;
11
12
/**
13
 * Class representing an md:NameIDMappingService element.
14
 *
15
 * @package simplesamlphp/saml2
16
 */
17
final class NameIDMappingService 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...
18
{
19
    use SchemaValidatableElementTrait;
20
21
22
    /**
23
     * NameIDMappingService constructor.
24
     *
25
     * This is an endpoint with one restriction: it cannot contain a ResponseLocation.
26
     *
27
     * @param \SimpleSAML\SAML2\Type\SAMLAnyURIValue $binding
28
     * @param \SimpleSAML\SAML2\Type\SAMLAnyURIValue $location
29
     * @param \SimpleSAML\SAML2\Type\SAMLAnyURIValue|null $responseLocation
30
     * @param \SimpleSAML\XML\Attribute[] $attributes
31
     *
32
     * @throws \SimpleSAML\Assert\AssertionFailedException
33
     */
34
    public function __construct(
35
        SAMLAnyURIValue $binding,
36
        SAMLAnyURIValue $location,
37
        ?SAMLAnyURIValue $responseLocation = null,
38
        array $attributes = [],
39
    ) {
40
        Assert::null(
41
            $responseLocation,
42
            'The \'ResponseLocation\' attribute must be omitted for md:NameIDMappingService.',
43
        );
44
45
        parent::__construct($binding, $location, null, $attributes);
46
    }
47
}
48