Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 9
RestApi
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 9
 __construct
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 6
 run
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 3
<?php
namespace MediaWiki\Extension\WikibaseManifest;
use MediaWiki\Rest\SimpleHandler;
class RestApi extends SimpleHandler {
    private $generator;
    private $emptyValueCleaner;
    public function __construct(
        ManifestGenerator $generator,
        EmptyValueCleaner $emptyValueCleaner
    ) {
        $this->generator = $generator;
        $this->emptyValueCleaner = $emptyValueCleaner;
    }
    public function run() {
        $output = $this->generator->generate();
        return $this->emptyValueCleaner->omitEmptyValues( $output );
    }
}