Passed
Pull Request — master (#6)
by Tim
02:20
created

AbstractDocumented   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A isEmptyElement() 0 3 1
A __construct() 0 3 1
A toXML() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\WSSecurity\XML\wsdl;
6
7
use DOMElement;
8
9
/**
10
 * Abstract class representing the tDocumented type.
11
 *
12
 * @package simplesamlphp/ws-security
13
 */
14
abstract class AbstractDocumented extends AbstractWsdlElement
15
{
16
    /**
17
     * Initialize a wsdl:tDocumented
18
     *
19
     * @TODO @param \SimpleSAML\WSSecurity\XML\wsdl\Documentation|null $documentation
0 ignored issues
show
Bug introduced by
The type SimpleSAML\WSSecurity\XML\wsdl\Documentation 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...
20
     */
21
    public function __construct(
22
        /*protected ?Documentation $documentation = null,*/
23
    ) {
24
    }
25
26
27
    /**
28
     * Get document
29
     *
30
     * @return \SimpleSAML\WSSecurity\XML\wsdl\Documentation|null
31
    public function getDocumentation(): ?Documentation
32
    {
33
        return $this->documentation;
34
    }
35
     */
36
37
38
    /**
39
     * Test if an object, at the state it's in, would produce an empty XML-element
40
     *
41
     * @return bool
42
     */
43
    public function isEmptyElement(): bool
44
    {
45
        return /*empty($this->documentation)*/ true;
46
    }
47
48
49
    /**
50
     * Convert this tDocumented to XML.
51
     *
52
     * @param \DOMElement|null $parent The element we are converting to XML.
53
     * @return \DOMElement The XML element after adding the data corresponding to this tDocumented.
54
     */
55
    public function toXML(DOMElement $parent = null): DOMElement
56
    {
57
        $e = $this->instantiateParentElement($parent);
58
59
        //$this->getDocumentation()?->toXML($e);
60
61
        return $e;
62
    }
63
}
64