Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
HTMLFormFieldRequiredOptionsException
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace MediaWiki\HTMLForm;
4
5use InvalidArgumentException;
6
7/**
8 * @newable
9 * @stable to extend
10 */
11class HTMLFormFieldRequiredOptionsException extends InvalidArgumentException {
12
13    /**
14     * @stable to call
15     *
16     * @param HTMLFormField $field
17     * @param array $missing
18     */
19    public function __construct( HTMLFormField $field, array $missing ) {
20        parent::__construct( sprintf( "Form type `%s` expected the following parameters to be set: %s",
21            get_class( $field ),
22            implode( ', ', $missing ) ) );
23    }
24}
25
26/** @deprecated class alias since 1.42 */
27class_alias( HTMLFormFieldRequiredOptionsException::class, 'HTMLFormFieldRequiredOptionsException' );