Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
MMLmunderover
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 newSubtree
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace MediaWiki\Extension\Math\WikiTexVC\MMLnodes;
4
5/**
6 * Presentation MathML 3 Element
7 * name: "munderover"
8 * description: "attach an underscript-overscript pair to a base"
9 * category: "Script and Limit Schemata"
10 */
11class MMLmunderover extends MMLbase {
12    /** @inheritDoc */
13    public function __construct( string $texclass = "", array $attributes = [] ) {
14        parent::__construct( "munderover", $texclass, $attributes );
15    }
16
17    /**
18     * Creates a new subtree element with base and scripts
19     * @param MMLbase|string $base Main content element
20     * @param MMLbase|string $underscript Element placed below the base (underscript)
21     * @param MMLbase|string $overscript Element placed above the base (overscript)
22     * @param string $texclass Optional TeX class for styling
23     * @param array $attributes Additional HTML attributes for the element
24     * @return static New instance with children in order: [base, underscript, overscript]
25     */
26    public static function newSubtree( $base,
27                                       $underscript,
28                                       $overscript,
29                                      string $texclass = "",
30                                      array $attributes = [] ) {
31        $instance = new self( $texclass, $attributes );
32        $instance->children = [ $base, $underscript, $overscript ];
33        return $instance;
34    }
35}