Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 12 |
|
0.00% |
0 / 12 |
CRAP | |
0.00% |
0 / 1 |
PPNode_Hash_Array | |
0.00% |
0 / 12 |
|
0.00% |
0 / 12 |
156 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
__toString | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getLength | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
item | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getNextSibling | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getChildren | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getFirstChild | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getChildrenOfType | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
splitArg | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
splitExt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
splitHeading | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | /** |
3 | * This program is free software; you can redistribute it and/or modify |
4 | * it under the terms of the GNU General Public License as published by |
5 | * the Free Software Foundation; either version 2 of the License, or |
6 | * (at your option) any later version. |
7 | * |
8 | * This program is distributed in the hope that it will be useful, |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | * GNU General Public License for more details. |
12 | * |
13 | * You should have received a copy of the GNU General Public License along |
14 | * with this program; if not, write to the Free Software Foundation, Inc., |
15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
16 | * http://www.gnu.org/copyleft/gpl.html |
17 | * |
18 | * @file |
19 | * @ingroup Parser |
20 | */ |
21 | |
22 | /** |
23 | * @ingroup Parser |
24 | */ |
25 | // phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps |
26 | class PPNode_Hash_Array implements PPNode { |
27 | |
28 | /** @var array */ |
29 | public $value; |
30 | |
31 | /** |
32 | * @param array $value |
33 | */ |
34 | public function __construct( $value ) { |
35 | $this->value = $value; |
36 | } |
37 | |
38 | public function __toString() { |
39 | return var_export( $this, true ); |
40 | } |
41 | |
42 | public function getLength() { |
43 | return count( $this->value ); |
44 | } |
45 | |
46 | public function item( $i ) { |
47 | return $this->value[$i]; |
48 | } |
49 | |
50 | public function getName() { |
51 | return '#nodelist'; |
52 | } |
53 | |
54 | public function getNextSibling() { |
55 | return false; |
56 | } |
57 | |
58 | public function getChildren() { |
59 | return false; |
60 | } |
61 | |
62 | public function getFirstChild() { |
63 | return false; |
64 | } |
65 | |
66 | public function getChildrenOfType( $name ) { |
67 | return false; |
68 | } |
69 | |
70 | public function splitArg() { |
71 | // @phan-suppress-previous-line PhanPluginNeverReturnMethod |
72 | throw new LogicException( __METHOD__ . ': not supported' ); |
73 | } |
74 | |
75 | public function splitExt() { |
76 | // @phan-suppress-previous-line PhanPluginNeverReturnMethod |
77 | throw new LogicException( __METHOD__ . ': not supported' ); |
78 | } |
79 | |
80 | public function splitHeading() { |
81 | // @phan-suppress-previous-line PhanPluginNeverReturnMethod |
82 | throw new LogicException( __METHOD__ . ': not supported' ); |
83 | } |
84 | } |