| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 75 | public function addAnnotation( |
||
| 76 | DIProperty $property, SemanticData $semanticData |
||
| 77 | ) { |
||
| 78 | if ( $this->approvedDate === null && class_exists( 'ApprovedRevs' ) ) { |
||
| 79 | $logReader = $this->appFactory->newDatabaseLogReader( |
||
| 80 | $semanticData->getSubject()->getTitle(), 'approval' |
||
| 81 | ); |
||
| 82 | $this->approvedDate = $logReader->getDateOfLogEntry(); |
||
| 83 | } |
||
| 84 | |||
| 85 | $dataItem = $this->getDataItem(); |
||
| 86 | if ( $dataItem ) { |
||
| 87 | $semanticData->addPropertyObjectValue( $property, $dataItem ); |
||
| 88 | } else { |
||
| 89 | $semanticData->removeProperty( $property ); |
||
| 90 | } |
||
| 91 | } |
||
| 92 | } |
||
| 93 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
integervalues, zero is a special case, in particular the following results might be unexpected: