| Total Complexity | 4 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 75% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | trait HasDrivers |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Get a log driver instance. |
||
| 17 | * |
||
| 18 | * @param string|null $driver |
||
| 19 | * @return Logger|\Psr\Log\LoggerInterface |
||
| 20 | */ |
||
| 21 | 4 | public function driver($driver = null) |
|
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Get the default log driver name. |
||
| 28 | * |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | 1 | public function getDefaultDriver() |
|
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Attempt to get the log from the local cache. |
||
| 38 | * |
||
| 39 | * @param string $name |
||
| 40 | * @return \Psr\Log\LoggerInterface |
||
| 41 | */ |
||
| 42 | 4 | protected function get($name) |
|
| 48 | } |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @param string $name |
||
| 53 | * @return mixed |
||
| 54 | */ |
||
| 55 | abstract protected function initDriver($name); |
||
| 56 | } |
||
| 57 |