PolicyURIsTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setPolicyURIs() 0 4 1
A getPolicyURIs() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\WSSecurity\XML\wsp;
6
7
use SimpleSAML\WSSecurity\Assert\Assert;
8
9
/**
10
 * Trait grouping common functionality for elements that can hold a PolicyURIs attribute.
11
 *
12
 * @package simplesamlphp/ws-security
13
 */
14
trait PolicyURIsTrait
15
{
16
    /**
17
     * The PolicyURIs.
18
     *
19
     * @var string[]
20
     */
21
    protected array $PolicyURIs;
22
23
24
    /**
25
     * Collect the value of the PolicyURIs-property
26
     *
27
     * @return array
28
     */
29
    public function getPolicyURIs(): array
30
    {
31
        return $this->PolicyURIs;
32
    }
33
34
35
    /**
36
     * Set the value of the PolicyURIs-property
37
     *
38
     * @param array $PolicyURIs
39
     */
40
    protected function setPolicyURIs(array $PolicyURIs): void
41
    {
42
        Assert::allValidURI($PolicyURIs);
43
        $this->PolicyURIs = $PolicyURIs;
44
    }
45
}
46