| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 65 | 1 | private function getPageTitle( Title $title ) { |
|
| 66 | |||
| 67 | 1 | $displayTitle = ''; |
|
| 68 | |||
| 69 | 1 | $dataValue = DataValueFactory::getInstance()->newDataItemValue( |
|
| 70 | 1 | DIWikiPage::newFromTitle( $title ) |
|
| 71 | 1 | ); |
|
| 72 | |||
| 73 | // 2.4+ |
||
| 74 | 1 | if ( method_exists( $dataValue , 'getDisplayTitle' ) ) { |
|
| 75 | 1 | $displayTitle = $dataValue->getDisplayTitle(); |
|
| 76 | 1 | } |
|
| 77 | |||
| 78 | 1 | return $displayTitle !== '' ? $displayTitle : $title->getSubpageText(); |
|
| 79 | } |
||
| 80 | |||
| 86 |