Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
75.00% covered (warning)
75.00%
3 / 4
CRAP
80.00% covered (warning)
80.00%
4 / 5
CirrusSearchServices
0.00% covered (danger)
0.00%
0 / 1
75.00% covered (warning)
75.00%
3 / 4
4.13
80.00% covered (warning)
80.00%
4 / 5
 wrap
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
 getCirrusSearch
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 getCirrusCategoriesClient
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
<?php
namespace CirrusSearch;
use MediaWiki\MediaWikiServices;
use MediaWiki\Sparql\SparqlClient;
/**
 * A simple wrapper for MediaWikiServices, to support type safety when accessing
 * services defined by this extension.
 */
class CirrusSearchServices {
    /** @var MediaWikiServices */
    private $services;
    public static function wrap( MediaWikiServices $services ): self {
        return new self( $services );
    }
    public function __construct( MediaWikiServices $services ) {
        $this->services = $services;
    }
    public function getCirrusSearch(): CirrusSearch {
        return $this->services->get( 'CirrusSearch' );
    }
    public function getCirrusCategoriesClient(): SparqlClient {
        return $this->services->get( 'CirrusCategoriesClient' );
    }
}