Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
11 / 11
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
ParserUtil
100.00% covered (success)
100.00%
11 / 11
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 createOptions
100.00% covered (success)
100.00%
11 / 11
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare( strict_types = 1 );
4
5namespace MediaWiki\Extension\Math\WikiTexVC;
6
7class ParserUtil {
8
9    /**
10     * @param array|null $options
11     * @return array
12     */
13    public static function createOptions( $options ) {
14        # get reference of the options for usage in functions and initialize with default values.
15        $optionsBase = [
16            'usemathrm' => false,
17            'usemhchem' => false,
18            'usemhchemtexified' => false,
19            'useintent' => false,
20            'oldtexvc' => false,
21            'oldmhchem' => false,
22            'debug' => false,
23            'report_required' => false
24        ];
25        return array_merge( $optionsBase, $options ?? [] );
26    }
27}