Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 2.0625 |
Changes | 0 |
1 | <?php |
||
50 | 1 | public function convert($xmlDocument) |
|
51 | { |
||
52 | /** |
||
53 | * @var resource $xmlDocument |
||
54 | */ |
||
55 | 1 | if (class_exists($this->streamClass)) { |
|
56 | 1 | return new $this->streamClass($xmlDocument); |
|
57 | } |
||
58 | |||
59 | throw new RuntimeException(sprintf('Provided StreamInterface implementation "%s" is not available on this system.', $this->streamClass)); |
||
60 | } |
||
61 | } |
||
62 |