Completed
Branch rewrite-api-md (eb38e5)
by Tim
03:57
created

NameIDMappingService   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SAML2\XML\md;
6
7
use Webmozart\Assert\Assert;
8
9
/**
10
 * Class representing an md:NameIDMappingService element.
11
 *
12
 * @package simplesamlphp/saml2
13
 */
14
final class NameIDMappingService extends AbstractEndpointType
15
{
16
    /**
17
     * NameIDMappingService constructor.
18
     *
19
     * This is an endpoint with one restriction: it cannot contain a ResponseLocation.
20
     *
21
     * @param string $binding
22
     * @param string $location
23
     * @param string|null $unused
24
     * @param array|null $attributes
25
     */
26
    public function __construct(
27
        string $binding,
28
        string $location,
29
        ?string $unused = null,
30
        ?array $attributes = null
31
    ) {
32
        Assert::null(
33
            $unused,
34
            'The \'ResponseLocation\' attribute must be omitted for md:NameIDMappingService.'
35
        );
36
        parent::__construct($binding, $location, null, $attributes);
37
    }
38
}
39