Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
26 | protected function validate($input): PaymentServiceInterface |
||
27 | { |
||
28 | Assert::that($input) |
||
29 | ->string('Must be a string.') |
||
30 | ->notBlank('Must not be empty.') |
||
31 | ->satisfy([$this->paymentServiceMap, 'has'], 'Unknown service.'); |
||
32 | |||
33 | /** @var PaymentServiceInterface $service */ |
||
34 | $service = $this->paymentServiceMap->get($input); |
||
35 | |||
36 | return $service; |
||
37 | } |
||
39 |