Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
ArticleCompileCategoryCount | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 1 |
compile | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
12 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\PageTriage\ArticleCompile; |
4 | |
5 | /** |
6 | * Article category count |
7 | */ |
8 | class ArticleCompileCategoryCount extends ArticleCompile { |
9 | |
10 | public function compile() { |
11 | foreach ( $this->mPageId as $pageId ) { |
12 | $parserOutput = $this->getParserOutputByPageId( $pageId ); |
13 | if ( $parserOutput ) { |
14 | $this->metadata[$pageId]['category_count'] = count( $parserOutput->getCategoryNames() ); |
15 | } |
16 | } |
17 | $this->fillInZeroCount( 'category_count' ); |
18 | return true; |
19 | } |
20 | |
21 | } |