Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 19
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace MediaWiki\Extension\Chart;
4
5use MediaWiki\Config\ServiceOptions;
6use MediaWiki\Logger\LoggerFactory;
7use MediaWiki\MediaWikiServices;
8
9/**
10 * @codeCoverageIgnore
11 */
12
13/** @phpcs-require-sorted-array */
14return [
15    'Chart.ChartArgumentsParser' => static function ( MediaWikiServices $services ): ChartArgumentsParser {
16        return new ChartArgumentsParser( $services->get( 'Chart.DataPageResolver' ) );
17    },
18    'Chart.ChartRenderer' => static function ( MediaWikiServices $services ): ChartRenderer {
19        return new ChartRenderer(
20            new ServiceOptions(
21                ChartRenderer::CONSTRUCTOR_OPTIONS,
22                $services->getMainConfig()
23            ),
24            $services->getHttpRequestFactory(),
25            $services->getFormatterFactory(),
26            LoggerFactory::getInstance( 'Chart' )
27        );
28    },
29    'Chart.DataPageResolver' => static function ( MediaWikiServices $services ): DataPageResolver {
30        return new DataPageResolver();
31    },
32];