Completed
Push — master ( d36330...3c9b9d )
by Lars
01:55
created

SimpleXmlDomNodeBlank   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 69
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 1
dl 0
loc 69
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A find() 0 4 1
A findMulti() 0 4 1
A findOne() 0 4 1
A innerHtml() 0 4 1
A innertext() 0 4 1
A outertext() 0 4 1
A text() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace voku\helper;
6
7
class SimpleXmlDomNodeBlank extends AbstractSimpleXmlDomNode implements SimpleXmlDomNodeInterface
8
{
9
    /**
10
     * @param string   $selector
11
     * @param int|null $idx
12
     *
13
     * @return null
14
     */
15
    public function find(string $selector, $idx = null)
16
    {
17
        return null;
18
    }
19
20
    /**
21
     * Find nodes with a CSS selector.
22
     *
23
     * @param string $selector
24
     *
25
     * @return SimpleXmlDomInterface[]|SimpleXmlDomNodeInterface
26
     */
27
    public function findMulti(string $selector): SimpleXmlDomNodeInterface
28
    {
29
        return new self();
30
    }
31
32
    /**
33
     * Find one node with a CSS selector.
34
     *
35
     * @param string $selector
36
     *
37
     * @return null
38
     */
39
    public function findOne(string $selector)
40
    {
41
        return null;
42
    }
43
44
    /**
45
     * @return string[]
46
     */
47
    public function innerHtml(): array
48
    {
49
        return [];
50
    }
51
52
    /**
53
     * alias for "$this->innerHtml()" (added for compatibly-reasons with v1.x)
54
     */
55
    public function innertext()
56
    {
57
        return [];
58
    }
59
60
    /**
61
     * alias for "$this->innerHtml()" (added for compatibly-reasons with v1.x)
62
     */
63
    public function outertext()
64
    {
65
        return [];
66
    }
67
68
    /**
69
     * @return string[]
70
     */
71
    public function text(): array
72
    {
73
        return [];
74
    }
75
}
76