| Conditions | 3 |
| Paths | 4 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | protected static function getDI() |
||
| 51 | { |
||
| 52 | $di = new FactoryDefault(); |
||
| 53 | |||
| 54 | $servicesPath = __DIR__.'/../../../../app/config/services.php'; |
||
| 55 | |||
| 56 | if (!realpath($servicesPath)) { |
||
| 57 | $servicesPath = __DIR__.'/../app/config/services.php'; |
||
| 58 | } |
||
| 59 | |||
| 60 | try { |
||
| 61 | include $servicesPath; |
||
| 62 | } catch (\Exception $e) { |
||
| 63 | throw FileNotFound::servicesFileNotFound( |
||
| 64 | 'Try passing the Yarak config array as the third argument '. |
||
| 65 | 'to Yarak::call.' |
||
| 66 | ); |
||
| 67 | } |
||
| 68 | |||
| 69 | return $di; |
||
| 70 | } |
||
| 71 | } |
||
| 72 |