Passed
Push — master ( 6db269...70aff8 )
by Jaime Pérez
02:49
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 $attributes
27
     * @throws \InvalidArgumentException
28
     */
29
    public function __construct(
30
        int $index,
31
        string $binding,
32
        string $location,
33
        ?bool $isDefault = null,
34
        ?string $unused = null,
35
        array $attributes = []
36
    ) {
37
        Assert::null(
38
            $unused,
39
            'The \'ResponseLocation\' attribute must be omitted for md:ArtifactResolutionService.'
40
        );
41
        parent::__construct($index, $binding, $location, $isDefault, null, $attributes);
42
    }
43
}
44