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