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

TypeDefParticleTrait   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 getParticle() 0 3 1
A setParticle() 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 are part of the xs:typeDefParticle group.
9
 *
10
 * @package simplesamlphp/xml-common
11
 */
12
trait TypeDefParticleTrait
13
{
14
    /**
15
     * The particle.
16
     *
17
     * @var \SimpleSAML\XMLSchema\XML\xs\TypeDefParticleInterface|null
18
     */
19
    protected ?TypeDefParticleInterface $particle = null;
20
21
22
    /**
23
     * Collect the value of the particle-property
24
     *
25
     * @return \SimpleSAML\XMLSchema\XML\xs\TypeDefParticleInterface|null
26
     */
27
    public function getParticle(): ?TypeDefParticleInterface
28
    {
29
        return $this->particle;
30
    }
31
32
33
    /**
34
     * Set the value of the particle-property
35
     *
36
     * @param \SimpleSAML\XMLSchema\XML\xs\TypeDefParticleInterface|null $particle
37
     */
38
    protected function setParticle(?TypeDefParticleInterface $particle = null): void
39
    {
40
        $this->particle = $particle;
41
    }
42
}
43