| Conditions | 4 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 4 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 79 | 4 | public function getLogger() |
|
| 80 | { |
||
| 81 | 4 | if (null === $this->logger) { |
|
| 82 | 4 | $logger = new Logger(Commander::LOGGER_NAME); |
|
| 83 | |||
| 84 | 4 | foreach ($this->getHandlers() as $handler) { |
|
| 85 | 2 | $logger->pushHandler($handler); |
|
| 86 | 2 | } |
|
| 87 | |||
| 88 | 4 | if (0 === count($logger->getHandlers())) { |
|
| 89 | 2 | return null; |
|
| 90 | } |
||
| 91 | |||
| 92 | 2 | $this->logger = $logger; |
|
| 93 | 1 | } |
|
| 94 | |||
| 95 | 2 | return $this->logger; |
|
| 96 | } |
||
| 97 | } |
||
| 98 |