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