Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
SearchTaskSuggesterFactory
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace GrowthExperiments\NewcomerTasks\TaskSuggester;
4
5use GrowthExperiments\NewcomerTasks\ConfigurationLoader\ConfigurationLoader;
6use GrowthExperiments\NewcomerTasks\NewcomerTasksUserOptionsLookup;
7use GrowthExperiments\NewcomerTasks\TaskSuggester\SearchStrategy\SearchStrategy;
8use GrowthExperiments\NewcomerTasks\TaskType\TaskTypeHandlerRegistry;
9use MediaWiki\Cache\LinkBatchFactory;
10use Psr\Log\NullLogger;
11
12abstract class SearchTaskSuggesterFactory extends TaskSuggesterFactory {
13
14    /** @var TaskTypeHandlerRegistry */
15    protected $taskTypeHandlerRegistry;
16
17    /** @var ConfigurationLoader */
18    protected $configurationLoader;
19
20    /** @var SearchStrategy */
21    protected $searchStrategy;
22
23    /** @var NewcomerTasksUserOptionsLookup */
24    protected $newcomerTasksUserOptionsLookup;
25
26    /** @var LinkBatchFactory */
27    protected $linkBatchFactory;
28
29    /**
30     * @param TaskTypeHandlerRegistry $taskTypeHandlerRegistry
31     * @param ConfigurationLoader $configurationLoader
32     * @param SearchStrategy $searchStrategy
33     * @param NewcomerTasksUserOptionsLookup $newcomerTasksUserOptionsLookup
34     * @param LinkBatchFactory $linkBatchFactory
35     */
36    public function __construct(
37        TaskTypeHandlerRegistry $taskTypeHandlerRegistry,
38        ConfigurationLoader $configurationLoader,
39        SearchStrategy $searchStrategy,
40        NewcomerTasksUserOptionsLookup $newcomerTasksUserOptionsLookup,
41        LinkBatchFactory $linkBatchFactory
42    ) {
43        $this->taskTypeHandlerRegistry = $taskTypeHandlerRegistry;
44        $this->configurationLoader = $configurationLoader;
45        $this->searchStrategy = $searchStrategy;
46        $this->linkBatchFactory = $linkBatchFactory;
47        $this->logger = new NullLogger();
48        $this->newcomerTasksUserOptionsLookup = $newcomerTasksUserOptionsLookup;
49    }
50
51}