Completed
Push — master ( 3c077b...77d3a9 )
by Gilles
06:36
created

MockNode::getIteratorArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace PHPHtmlParser\Dom;
3
4
/**
5
 * This mock object is used solely for testing the abstract
6
 * class Node with out any potential side effects caused
7
 * by testing a supper class of Node.
8
 *
9
 * This object is not to be used for any other reason.
10
 */
11
class MockNode extends InnerNode
12
{
13
14
    /**
15
     * Mock of innner html.
16
     */
17
    public function innerHtml()
18
    {
19
    }
20
21
    /**
22
     * Mock of outer html.
23
     */
24
    public function outerHtml()
25
    {
26
    }
27
28
    /**
29
     * Mock of text.
30
     */
31
    public function text()
32
    {
33
    }
34
35
    /**
36
     * Clear content of this node
37
     */
38
    protected function clear()
39
    {
40
        $this->innerHtml = null;
0 ignored issues
show
Bug introduced by
The property innerHtml does not seem to exist. Did you mean innerhtml?

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
41
        $this->outerHtml = null;
0 ignored issues
show
Bug introduced by
The property outerHtml does not seem to exist. Did you mean outerhtml?

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
42
        $this->text      = null;
43
    }
44
45
    /**
46
     * Returns all children of this html node.
47
     *
48
     * @return array
49
     */
50
    protected function getIteratorArray()
51
    {
52
        return $this->getChildren();
53
    }
54
}
55