Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
18 | public function getEmbed() |
||
19 | { |
||
20 | $sourceClass = config("laravel-videoable.sources.{$this->source}"); |
||
21 | |||
22 | if (class_exists($sourceClass) === false) { |
||
23 | throw new VideoPresenterNotFound($sourceClass); |
||
24 | } |
||
25 | |||
26 | return (new $sourceClass(get_object_vars($this)))->getEmbedCode(); |
||
27 | } |
||
28 | } |
||
29 |