Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 13
0.00% covered (danger)
0.00%
0 / 12
CRAP
0.00% covered (danger)
0.00%
0 / 1
PPNode_Hash_Array
0.00% covered (danger)
0.00%
0 / 12
0.00% covered (danger)
0.00%
0 / 12
156
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 __toString
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getLength
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 item
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getName
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getNextSibling
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getChildren
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getFirstChild
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getChildrenOfType
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 splitArg
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 splitExt
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 splitHeading
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
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
22namespace MediaWiki\Parser;
23
24use LogicException;
25use Stringable;
26
27/**
28 * @ingroup Parser
29 */
30// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
31class PPNode_Hash_Array implements Stringable, PPNode {
32
33    /** @var array */
34    public $value;
35
36    /**
37     * @param array $value
38     */
39    public function __construct( $value ) {
40        $this->value = $value;
41    }
42
43    public function __toString() {
44        return var_export( $this, true );
45    }
46
47    public function getLength() {
48        return count( $this->value );
49    }
50
51    public function item( $i ) {
52        return $this->value[$i];
53    }
54
55    public function getName() {
56        return '#nodelist';
57    }
58
59    public function getNextSibling() {
60        return false;
61    }
62
63    public function getChildren() {
64        return false;
65    }
66
67    public function getFirstChild() {
68        return false;
69    }
70
71    public function getChildrenOfType( $name ) {
72        return false;
73    }
74
75    public function splitArg() {
76        // @phan-suppress-previous-line PhanPluginNeverReturnMethod
77        throw new LogicException( __METHOD__ . ': not supported' );
78    }
79
80    public function splitExt() {
81        // @phan-suppress-previous-line PhanPluginNeverReturnMethod
82        throw new LogicException( __METHOD__ . ': not supported' );
83    }
84
85    public function splitHeading() {
86        // @phan-suppress-previous-line PhanPluginNeverReturnMethod
87        throw new LogicException( __METHOD__ . ': not supported' );
88    }
89}
90
91/** @deprecated class alias since 1.43 */
92class_alias( PPNode_Hash_Array::class, 'PPNode_Hash_Array' );