| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 49 | public function addAnnotation( DIProperty $property, SemanticData $semanticData ) { |
||
| 50 | if ( !class_exists( 'ApprovedRevs' ) ) { |
||
| 51 | return null; |
||
| 52 | } |
||
| 53 | |||
| 54 | $title = $semanticData->getSubject()->getTitle(); |
||
| 55 | $rev = ApprovedRevs::getApprovedRevID( $title ); |
||
| 56 | |||
| 57 | if ( is_numeric( $rev ) ) { |
||
| 58 | $semanticData->addPropertyObjectValue( $property, new DINumber( $rev ) ); |
||
| 59 | } else { |
||
| 60 | $semanticData->removeProperty( $property ); |
||
| 61 | } |
||
| 62 | } |
||
| 63 | } |
||
| 64 |