Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
20.00% |
1 / 5 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
| SpecialSkinDistributor | |
20.00% |
1 / 5 |
|
50.00% |
1 / 2 |
12.19 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getPopularList | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
12 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Extension\ExtensionDistributor\Specials; |
| 4 | |
| 5 | use MediaWiki\Extension\ExtensionDistributor\Providers\ExtDistProvider; |
| 6 | use Wikimedia\Stats\StatsFactory; |
| 7 | |
| 8 | /** |
| 9 | * Special page that allows users to download skins as tar archives. |
| 10 | * |
| 11 | * @author Legoktm |
| 12 | */ |
| 13 | class SpecialSkinDistributor extends SpecialBaseDistributor { |
| 14 | |
| 15 | /** @var string */ |
| 16 | protected $type = ExtDistProvider::SKINS; |
| 17 | |
| 18 | /** |
| 19 | * @param StatsFactory $statsFactory |
| 20 | */ |
| 21 | public function __construct( StatsFactory $statsFactory ) { |
| 22 | parent::__construct( 'SkinDistributor', $statsFactory ); |
| 23 | } |
| 24 | |
| 25 | /** @inheritDoc */ |
| 26 | protected function getPopularList() { |
| 27 | $list = parent::getPopularList(); |
| 28 | if ( $list ) { |
| 29 | return $list; |
| 30 | } |
| 31 | |
| 32 | return $this->getConfig()->get( 'ExtDistPopularSkinList' ) ?: false; |
| 33 | } |
| 34 | } |