Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
56 | 4 | public function addAnnotation( DIProperty $property, SemanticData $semanticData ) { |
|
57 | |||
58 | 4 | $title = $semanticData->getSubject()->getTitle(); |
|
59 | |||
60 | 4 | $numRevisions = $this->getPageRevisions( |
|
61 | 4 | $title->getArticleID() |
|
62 | 4 | ); |
|
63 | |||
64 | 4 | $dataItem = null; |
|
65 | |||
66 | 4 | if ( $title->exists() && $numRevisions > 0 ) { |
|
67 | 1 | $dataItem = new DINumber( $numRevisions ); |
|
68 | 1 | } |
|
69 | |||
70 | 4 | if ( $dataItem instanceof DataItem ) { |
|
71 | 1 | $semanticData->addPropertyObjectValue( $property, $dataItem ); |
|
72 | 1 | } |
|
73 | 4 | } |
|
74 | |||
84 |