| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 4.125 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | 2 | public function __construct(?EmbedLib $embed = null) |
|
| 25 | { |
||
| 26 | 2 | if ($embed === null) { |
|
| 27 | if (! \class_exists(EmbedLib::class)) { |
||
| 28 | throw new \RuntimeException('The embed/embed package is not installed. Please install it with Composer to use this adapter.'); |
||
| 29 | } |
||
| 30 | |||
| 31 | $embed = new EmbedLib(); |
||
| 32 | } |
||
| 33 | |||
| 34 | 2 | $this->embedLib = $embed; |
|
| 35 | } |
||
| 50 |