| Conditions | 2 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function register(ContainerInterface $app) |
||
| 17 | { |
||
| 18 | $app->bind(LoggerInterface::class, Logger::class) |
||
| 19 | ->assign('name', ['value' => 'wandu']) |
||
| 20 | ->after(function (Logger $logger, Config $config) { |
||
| 21 | if ($path = $config->get('log.path')) { |
||
| 22 | $logger->pushHandler(new StreamHandler($path)); |
||
| 23 | } |
||
| 24 | return $logger; |
||
| 25 | }); |
||
| 26 | } |
||
| 27 | } |
||
| 28 |