Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
OfferClient | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
4 | |
100.00% |
1 / 1 |
getOffer | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
4 |
1 | <?php |
2 | |
3 | namespace Alfa\Interview; |
4 | |
5 | class OfferClient |
6 | { |
7 | public function getOffer(string $insuranceType): int |
8 | { |
9 | // Dummy response |
10 | return match ($insuranceType) { |
11 | InsuranceCalculator::TYPE_FLAT => 100, |
12 | InsuranceCalculator::TYPE_CASCO => 200, |
13 | default => 0, |
14 | }; |
15 | } |
16 | } |