Conditions | 2 |
Paths | 1 |
Total Lines | 23 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
40 | public function __construct( |
||
41 | EntityId $fromId, |
||
42 | PropertyId $propertyId, |
||
43 | array $toIds, |
||
44 | $message = null, |
||
45 | ?Exception $previous = null |
||
46 | ) { |
||
47 | $this->fromId = $fromId; |
||
48 | $this->propertyId = $propertyId; |
||
49 | $this->toIds = $toIds; |
||
50 | |||
51 | $targets = array_map( |
||
52 | static function ( EntityId $entityId ) { |
||
53 | return $entityId->getSerialization(); |
||
54 | }, |
||
55 | $toIds |
||
56 | ); |
||
57 | $targets = implode( ', ', $targets ); |
||
58 | |||
59 | $message = $message ?: 'Referenced entity id lookup failed. Tried to find a referenced entity out of ' . |
||
60 | $targets . ' linked from ' . $fromId->getSerialization() . ' via ' . $propertyId->getSerialization(); |
||
61 | |||
62 | parent::__construct( $message, 0, $previous ); |
||
63 | } |
||
66 |