Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 1
InvalidTitleStringException
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 3
12
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
 getErrorMsgKey
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getErrorMsgParams
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3declare( strict_types=1 );
4
5namespace MediaWiki\Extension\CampaignEvents\MWEntity;
6
7class InvalidTitleStringException extends InvalidEventPageException {
8    private string $errorMsgKey;
9    private array $errorMsgParams;
10
11    /**
12     * @param string $titleString
13     * @param string $errorMsgKey
14     * @param array $errorMsgParams
15     */
16    public function __construct( string $titleString, string $errorMsgKey, array $errorMsgParams ) {
17        parent::__construct( "Invalid title string: `$titleString`. Details msg key: $errorMsgKey" );
18        $this->errorMsgKey = $errorMsgKey;
19        $this->errorMsgParams = $errorMsgParams;
20    }
21
22    /**
23     * @return string
24     */
25    public function getErrorMsgKey(): string {
26        return $this->errorMsgKey;
27    }
28
29    /**
30     * @return array
31     */
32    public function getErrorMsgParams(): array {
33        return $this->errorMsgParams;
34    }
35}