Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
24 | 5 | public function extract($aggregate) |
|
25 | { |
||
26 | 5 | foreach ($this->extractors as $extractor) { |
|
27 | try { |
||
28 | 4 | return $extractor->extract($aggregate); |
|
29 | 2 | } catch (AggregateIdNotFoundException $e) { |
|
|
|||
30 | } |
||
31 | } |
||
32 | 2 | throw new AggregateIdNotFoundException(sprintf('Id cannot be extracted from %s', get_class($aggregate))); |
|
33 | } |
||
34 | } |
||
35 |