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

TypeDefParticleTrait::setParticle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
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