Total Complexity | 3 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class TermLookupException extends RuntimeException { |
||
16 | |||
17 | /** |
||
18 | * @var EntityId |
||
19 | */ |
||
20 | private $entityId; |
||
21 | |||
22 | /** |
||
23 | * @param EntityId $entityId |
||
24 | * @param string[] $languageCodes |
||
25 | * @param string|null $message |
||
26 | * @param Exception|null $previous |
||
27 | */ |
||
28 | public function __construct( |
||
29 | EntityId $entityId, |
||
30 | array $languageCodes, |
||
31 | $message = null, |
||
32 | ?Exception $previous = null |
||
33 | ) { |
||
34 | $this->entityId = $entityId; |
||
35 | |||
36 | $codesString = implode( ', ', $languageCodes ); |
||
37 | |||
38 | parent::__construct( |
||
39 | $message ?: 'Term lookup failed for: ' . $entityId . ' with language codes: ' . $codesString, |
||
40 | 0, |
||
41 | $previous |
||
42 | ); |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @return EntityId |
||
47 | */ |
||
48 | public function getEntityId() { |
||
50 | } |
||
51 | |||
53 |