Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
51 | public function addAnnotation( DIProperty $property, SemanticData $semanticData ) { |
||
52 | |||
53 | $title = $semanticData->getSubject()->getTitle()->getTalkPage(); |
||
54 | |||
55 | $numRevisions = $this->getPageRevisions( |
||
56 | $title->getArticleID() |
||
57 | ); |
||
58 | |||
59 | $dataItem = null; |
||
60 | |||
61 | if ( $title->exists() && $numRevisions > 0 ) { |
||
62 | $dataItem = new DINumber( $numRevisions ); |
||
63 | } |
||
64 | |||
65 | if ( $dataItem instanceof DataItem ) { |
||
66 | $semanticData->addPropertyObjectValue( $property, $dataItem ); |
||
67 | } |
||
68 | } |
||
69 | |||
79 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.