ComplexTypeModelTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 6
dl 0
loc 33
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setContent() 0 3 1
A getContent() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XMLSchema\XML\Trait;
6
7
use SimpleSAML\XMLSchema\XML\ComplexContent;
0 ignored issues
show
Bug introduced by
The type SimpleSAML\XMLSchema\XML\ComplexContent was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use SimpleSAML\XMLSchema\XML\SimpleContent;
0 ignored issues
show
Bug introduced by
The type SimpleSAML\XMLSchema\XML\SimpleContent was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
10
/**
11
 * Trait grouping common functionality for elements that are part of the xs:complexTypeModel group.
12
 *
13
 * @package simplesamlphp/xml-common
14
 */
15
trait ComplexTypeModelTrait
16
{
17
    use AttrDeclsTrait;
18
    use TypeDefParticleTrait;
19
20
21
    /**
22
     * The content.
23
     *
24
     * @var \SimpleSAML\XMLSchema\XML\SimpleContent|\SimpleSAML\XMLSchema\XML\ComplexContent|null
25
     */
26
    protected SimpleContent|ComplexContent|null $content = null;
27
28
29
    /**
30
     * Collect the value of the content-property
31
     *
32
     * @return \SimpleSAML\XMLSchema\XML\SimpleContent|\SimpleSAML\XMLSchema\XML\ComplexContent|null
33
     */
34
    public function getContent(): SimpleContent|ComplexContent|null
35
    {
36
        return $this->content;
37
    }
38
39
40
    /**
41
     * Set the value of the content-property
42
     *
43
     * @param \SimpleSAML\XMLSchema\XML\SimpleContent|\SimpleSAML\XMLSchema\XML\ComplexContent|null $content
44
     */
45
    protected function setContent(SimpleContent|ComplexContent|null $content = null): void
46
    {
47
        $this->content = $content;
48
    }
49
}
50