| Total Complexity | 3 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | class MaxReferencedEntityVisitsExhaustedException extends ReferencedEntityIdLookupException { |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var int |
||
| 21 | */ |
||
| 22 | private $maxEntityVisits; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param EntityId $fromId |
||
| 26 | * @param PropertyId $propertyId |
||
| 27 | * @param EntityId[] $toIds |
||
| 28 | * @param int $maxEntityVisits |
||
| 29 | * @param string|null $message |
||
| 30 | * @param Exception|null $previous |
||
| 31 | */ |
||
| 32 | public function __construct( |
||
| 33 | EntityId $fromId, |
||
| 34 | PropertyId $propertyId, |
||
| 35 | array $toIds, |
||
| 36 | $maxEntityVisits, |
||
| 37 | $message = null, |
||
| 38 | ?Exception $previous = null |
||
| 39 | ) { |
||
| 40 | $this->maxEntityVisits = $maxEntityVisits; |
||
| 41 | $message = $message ?: 'Referenced entity id lookup failed: Maximum number of entity visits (' . |
||
| 42 | $maxEntityVisits . ') exhausted.'; |
||
| 43 | |||
| 44 | parent::__construct( $fromId, $propertyId, $toIds, $message, $previous ); |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return int |
||
| 49 | */ |
||
| 50 | public function getMaxEntityVisits() { |
||
| 52 | } |
||
| 53 | |||
| 55 |