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 |
||
25 | 2 | public function __construct(?EmbedLib $embed = null) |
|
26 | { |
||
27 | 2 | if ($embed === null) { |
|
28 | if (! \class_exists(EmbedLib::class)) { |
||
29 | throw new MissingDependencyException('The embed/embed package is not installed. Please install it with Composer to use this adapter.'); |
||
30 | } |
||
31 | |||
32 | $embed = new EmbedLib(); |
||
33 | } |
||
34 | |||
35 | 2 | $this->embedLib = $embed; |
|
36 | } |
||
51 |