| Total Complexity | 2 |
| Total Lines | 11 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 7 | class IdentityMapException extends StorageException |
||
| 8 | { |
||
| 9 | public static function forEntityWithoutIdentity(Entity $entity): IdentityMapException |
||
| 10 | { |
||
| 11 | $class = get_class($entity); |
||
| 12 | return new self("${class} has no identity, thus it cannot be attached to IdentityMap."); |
||
| 13 | } |
||
| 14 | |||
| 15 | public static function forNonExistingEntity($id): IdentityMapException |
||
| 16 | { |
||
| 17 | return new self("Object with {$id} was not found in IdentityMap."); |
||
| 18 | } |
||
| 20 |