Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| RecoverableTitleException | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getImportPlan | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace FileImporter\Exceptions; |
| 4 | |
| 5 | use FileImporter\Data\ImportPlan; |
| 6 | use Throwable; |
| 7 | use Wikimedia\Message\MessageSpecifier; |
| 8 | |
| 9 | /** |
| 10 | * Exception thrown when an import has an issue with the planned title that can be |
| 11 | * resolved by the user. |
| 12 | * |
| 13 | * @license GPL-2.0-or-later |
| 14 | * @author Addshore |
| 15 | */ |
| 16 | class RecoverableTitleException extends TitleException { |
| 17 | |
| 18 | private ImportPlan $importPlan; |
| 19 | |
| 20 | /** |
| 21 | * @param string|array|MessageSpecifier $messageSpec See Message::newFromSpecifier |
| 22 | * @param ImportPlan $importPlan ImportPlan to recover the import of. |
| 23 | * @param Throwable|null $previous |
| 24 | */ |
| 25 | public function __construct( $messageSpec, ImportPlan $importPlan, ?Throwable $previous = null ) { |
| 26 | $this->importPlan = $importPlan; |
| 27 | |
| 28 | parent::__construct( $messageSpec, $previous ); |
| 29 | } |
| 30 | |
| 31 | public function getImportPlan(): ImportPlan { |
| 32 | return $this->importPlan; |
| 33 | } |
| 34 | |
| 35 | } |