Completed
Push — master ( f72cfb...4ef12f )
by Tim
21s queued 18s
created

SimpleDerivationTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setDerivation() 0 3 1
A getDerivation() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XMLSchema\XML\xs;
6
7
/**
8
 * Trait grouping common functionality for elements that can occur in the xs:simpleDerivation group.
9
 *
10
 * @package simplesamlphp/xml-common
11
 */
12
trait SimpleDerivationTrait
13
{
14
    /**
15
     * The derivation.
16
     *
17
     * @var \SimpleSAML\XMLSchema\XML\xs\SimpleDerivationInterface
18
     */
19
    protected SimpleDerivationInterface $derivation;
20
21
22
    /**
23
     * Collect the value of the derivation-property
24
     *
25
     * @return \SimpleSAML\XMLSchema\XML\xs\SimpleDerivationInterface
26
     */
27
    public function getDerivation(): SimpleDerivationInterface
28
    {
29
        return $this->derivation;
30
    }
31
32
33
    /**
34
     * Set the value of the derivation-property
35
     *
36
     * @param \SimpleSAML\XMLSchema\XML\xs\SimpleDerivationInterface $derivation
37
     */
38
    protected function setDerivation(SimpleDerivationInterface $derivation): void
39
    {
40
        $this->derivation = $derivation;
41
    }
42
}
43