Conditions | 4 |
Paths | 6 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4.3731 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
33 | function assets_manager() |
||
34 | { |
||
35 | 3 | $container = function_exists('app') ? app() : Container::getInstance(); |
|
36 | 3 | if (!$container) { |
|
37 | /** @noinspection PhpUnhandledExceptionInspection */ |
||
38 | throw new Exception("No container was found for assets_manager function"); |
||
39 | } |
||
40 | |||
41 | 3 | $manager = $container->get('assets.manager'); |
|
42 | 3 | if (!$manager) { |
|
43 | /** @noinspection PhpUnhandledExceptionInspection */ |
||
44 | throw new Exception("No Assets Manager was found in the container"); |
||
45 | } |
||
46 | |||
47 | 3 | return $manager; |
|
48 | } |
||
49 |