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

ArtifactResolutionService::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 6
dl 0
loc 13
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SAML2\XML\md;
6
7
use Webmozart\Assert\Assert;
8
9
/**
10
 * A class implementing the md:ArtifactResolutionService element.
11
 *
12
 * @package simplesamlphp/saml2
13
 */
14
final class ArtifactResolutionService extends AbstractIndexedEndpointType
15
{
16
    /**
17
     * ArtifactResolutionService constructor.
18
     *
19
     * This is an endpoint with one restriction: it cannot contain a ResponseLocation.
20
     *
21
     * @param int $index
22
     * @param string $binding
23
     * @param string $location
24
     * @param bool|null $isDefault
25
     * @param string|null $unused
26
     * @param array|null $attributes
27
     */
28
    public function __construct(
29
        int $index,
30
        string $binding,
31
        string $location,
32
        ?bool $isDefault = null,
33
        ?string $unused = null,
34
        ?array $attributes = null
35
    ) {
36
        Assert::null(
37
            $unused,
38
            'The \'ResponseLocation\' attribute must be omitted for md:ArtifactResolutionService.'
39
        );
40
        parent::__construct($index, $binding, $location, $isDefault, null, $attributes);
41
    }
42
}
43