| Conditions | 5 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 6.1384 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 65 | 2 | public function addAnnotation( |
|
| 66 | DIProperty $property, SemanticData $semanticData |
||
| 67 | ) { |
||
| 68 | 2 | if ( $this->approvedStatus === null && class_exists( 'ApprovedRevs' ) ) { |
|
| 69 | $logReader = $this->appFactory->newDatabaseLogReader( |
||
| 70 | $semanticData->getSubject()->getTitle(), 'approval' |
||
| 71 | ); |
||
| 72 | $this->approvedStatus = $logReader->getStatusOfLogEntry(); |
||
| 73 | } |
||
| 74 | |||
| 75 | 2 | if ( is_string( $this->approvedStatus ) && $this->approvedStatus !== "" ) { |
|
| 76 | 1 | $semanticData->addPropertyObjectValue( |
|
| 77 | 1 | $property, $this->getDataItem() |
|
| 78 | 1 | ); |
|
| 79 | 1 | } else { |
|
| 80 | 1 | $semanticData->removeProperty( $property ); |
|
| 81 | } |
||
| 82 | 2 | } |
|
| 83 | } |
||
| 84 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..