Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
37.50% |
3 / 8 |
|
75.00% |
3 / 4 |
CRAP | |
0.00% |
0 / 1 |
| ScoreDisabledException | |
37.50% |
3 / 8 |
|
75.00% |
3 / 4 |
7.91 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getBox | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 | |||
| isTracked | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getStatsdKey | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Extension\Score; |
| 4 | |
| 5 | use MediaWiki\Html\Html; |
| 6 | |
| 7 | class ScoreDisabledException extends ScoreException { |
| 8 | public function __construct() { |
| 9 | parent::__construct( 'score-exec-disabled' ); |
| 10 | } |
| 11 | |
| 12 | /** @inheritDoc */ |
| 13 | protected function getBox( string $content ): string { |
| 14 | return Html::rawElement( |
| 15 | 'div', |
| 16 | [ 'class' => 'mw-ext-score-disabled' ], |
| 17 | $content |
| 18 | ); |
| 19 | } |
| 20 | |
| 21 | /** @inheritDoc */ |
| 22 | public function isTracked() { |
| 23 | return false; |
| 24 | } |
| 25 | |
| 26 | /** @inheritDoc */ |
| 27 | public function getStatsdKey() { |
| 28 | return false; |
| 29 | } |
| 30 | } |