Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| BounceHandlerJob | |
0.00% |
0 / 6 |
|
0.00% |
0 / 2 |
12 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| run | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
6 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Extension\BounceHandler; |
| 4 | |
| 5 | use MediaWiki\JobQueue\Job; |
| 6 | use MediaWiki\Title\Title; |
| 7 | |
| 8 | /** |
| 9 | * Class BounceHandlerJob |
| 10 | * |
| 11 | * Job Queue class to receive a POST request |
| 12 | * |
| 13 | * @ingroup JobQueue |
| 14 | * @author Tony Thomas |
| 15 | * @license GPL-2.0-or-later |
| 16 | */ |
| 17 | class BounceHandlerJob extends Job { |
| 18 | /** @inheritDoc */ |
| 19 | public function __construct( Title $title, array $params ) { |
| 20 | parent::__construct( 'BounceHandlerJob', $title, $params ); |
| 21 | } |
| 22 | |
| 23 | /** @inheritDoc */ |
| 24 | public function run() { |
| 25 | $email = $this->params['email']; |
| 26 | |
| 27 | if ( $email ) { |
| 28 | $bounceProcessor = ProcessBounceEmails::getProcessor(); |
| 29 | $bounceProcessor->handleBounce( $email ); |
| 30 | } |
| 31 | |
| 32 | return true; |
| 33 | } |
| 34 | } |