Conditions | 6 |
Paths | 9 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 42 |
Changes | 0 |
1 | <?php |
||
27 | public function __construct(ClassLoader $loader = null) |
||
28 | { |
||
29 | if (!$loader) { |
||
30 | $loaders = spl_autoload_functions(); |
||
31 | foreach ($loaders as $loader) { |
||
32 | if (is_array($loader) && $loader[0] instanceof ClassLoader) { |
||
33 | $loader = $loader[0]; |
||
34 | break; |
||
35 | } |
||
36 | } |
||
37 | if (!$loader) { |
||
38 | throw new ReflectionException("Can not found a correct composer loader"); |
||
39 | } |
||
40 | } |
||
41 | $this->loader = $loader; |
||
42 | } |
||
43 | |||
56 |