| Total Complexity | 4 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class ExceptionIgnoringEntityLookup implements EntityLookup { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var EntityLookup |
||
| 19 | */ |
||
| 20 | private $lookup; |
||
| 21 | |||
| 22 | public function __construct( EntityLookup $lookup ) { |
||
| 23 | $this->lookup = $lookup; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Attempt to retrieve the entity, |
||
| 28 | * returning `null` if any errors occur. |
||
| 29 | * |
||
| 30 | * @param EntityId $entityId |
||
| 31 | * @return EntityDocument|null |
||
| 32 | */ |
||
| 33 | public function getEntity( EntityId $entityId ) { |
||
| 38 | } |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Returns whether the given entity can potentially be looked up using {@link getEntity()}. |
||
| 43 | * Note that this does not guarantee {@link getEntity()} will return an {@link EntityDocument} – |
||
| 44 | * it may still return `null` if an error occurs retrieving the entity. |
||
| 45 | * |
||
| 46 | * @param EntityId $entityId |
||
| 47 | * @return bool |
||
| 48 | */ |
||
| 49 | public function hasEntity( EntityId $entityId ) { |
||
| 51 | } |
||
| 52 | |||
| 54 |