Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| RestApi | |
0.00% |
0 / 4 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| run | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Extension\WikibaseManifest; |
| 4 | |
| 5 | use MediaWiki\Rest\SimpleHandler; |
| 6 | |
| 7 | class RestApi extends SimpleHandler { |
| 8 | private $generator; |
| 9 | private $emptyValueCleaner; |
| 10 | |
| 11 | public function __construct( |
| 12 | ManifestGenerator $generator, |
| 13 | EmptyValueCleaner $emptyValueCleaner |
| 14 | ) { |
| 15 | $this->generator = $generator; |
| 16 | $this->emptyValueCleaner = $emptyValueCleaner; |
| 17 | } |
| 18 | |
| 19 | public function run() { |
| 20 | $output = $this->generator->generate(); |
| 21 | return $this->emptyValueCleaner->omitEmptyValues( $output ); |
| 22 | } |
| 23 | } |