| Total Complexity | 11 |
| Total Lines | 91 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | abstract class AbstractAdapter implements AdapterInterface |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Log format. |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $format = '{date} {message}'; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Date format. |
||
| 28 | * |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | protected $date_format = 'Y-d-m H:i:s'; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Level. |
||
| 35 | * |
||
| 36 | * @var int |
||
| 37 | */ |
||
| 38 | protected $level = 7; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Create adapter. |
||
| 42 | */ |
||
| 43 | public function __construct(? Iterable $config = null) |
||
| 44 | { |
||
| 45 | $this->setOptions($config); |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Get format. |
||
| 50 | * |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | public function getFormat(): string |
||
| 54 | { |
||
| 55 | return $this->format; |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Get date format. |
||
| 60 | */ |
||
| 61 | public function getDateFormat(): string |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Get level. |
||
| 68 | * |
||
| 69 | * @return int |
||
| 70 | */ |
||
| 71 | public function getLevel(): int |
||
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * Set options. |
||
| 78 | * |
||
| 79 | * @return AdapterInterface |
||
| 80 | */ |
||
| 81 | public function setOptions(? Iterable $config = null): AdapterInterface |
||
| 110 |