| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | public function getMethodByName(string $methodName): ?MollieGatewayConfigInterface |
||
| 33 | { |
||
| 34 | $method = $this->mollieGatewayConfig->filter(function (MollieGatewayConfigInterface $mollieGatewayConfig) use ($methodName) { |
||
| 35 | return $mollieGatewayConfig->getMethodId() === $methodName; |
||
|
|
|||
| 36 | }); |
||
| 37 | |||
| 38 | if ($method->isEmpty()) { |
||
| 39 | return null; |
||
| 40 | } |
||
| 41 | |||
| 42 | return $method->first(); |
||
| 43 | } |
||
| 45 |