| Conditions | 4 |
| Paths | 4 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4.25 |
| Changes | 0 | ||
| 1 | <?php |
||
| 58 | 2 | public function addAnnotation( SemanticData $semanticData ) { |
|
| 59 | |||
| 60 | 2 | if ( $this->approvedStatus === null ) { |
|
| 61 | $this->approvedStatus = $this->databaseLogReader->getStatusOfLogEntry( |
||
| 62 | $semanticData->getSubject()->getTitle(), |
||
| 63 | 'approval' |
||
| 64 | ); |
||
| 65 | } |
||
| 66 | |||
| 67 | 2 | $property = $this->newDIProperty(); |
|
| 68 | 2 | $semanticData->removeProperty( $property ); |
|
| 69 | |||
| 70 | 2 | if ( is_string( $this->approvedStatus ) && $this->approvedStatus !== '' ) { |
|
| 71 | 1 | $semanticData->addPropertyObjectValue( |
|
| 72 | 1 | $property, |
|
| 73 | 1 | new DIBlob( $this->approvedStatus ) |
|
| 74 | ); |
||
| 75 | } |
||
| 76 | 2 | } |
|
| 77 | |||
| 79 |
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..