| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | public function formatEntityId( EntityId $entityId ) { |
||
| 37 | $term = $this->lookupEntityLabel( $entityId ); |
||
| 38 | if ( $term !== null ) { |
||
| 39 | 4 | return $term->getText(); |
|
| 40 | 4 | } |
|
| 41 | 4 | ||
| 42 | 1 | // @fixme check if the entity is deleted and format differently? |
|
| 43 | return $entityId->getSerialization(); |
||
| 44 | } |
||
| 60 |