| Conditions | 3 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | protected function getPacker(Rocket $rocket): ParserInterface |
||
| 39 | { |
||
| 40 | $packer = Pay::get($rocket->getDirection() ?? ParserInterface::class); |
||
| 41 | |||
| 42 | $packer = is_string($packer) ? Pay::get($packer) : $packer; |
||
| 43 | |||
| 44 | if (!($packer instanceof ParserInterface)) { |
||
| 45 | throw new InvalidConfigException(InvalidConfigException::INVALID_PACKER); |
||
| 46 | } |
||
| 47 | |||
| 48 | return $packer; |
||
| 49 | } |
||
| 51 |