| Total Complexity | 6 |
| Total Lines | 70 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class LogStatic |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var null|Log |
||
| 9 | */ |
||
| 10 | protected static $instance; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * log event information into file |
||
| 14 | * |
||
| 15 | * @param string $level |
||
| 16 | * @param array|string $message |
||
| 17 | * @param array $context |
||
| 18 | * @param array $params |
||
| 19 | * @return Log |
||
| 20 | */ |
||
| 21 | 1 | public static function log($level, $message, array $context = [], array $params = []) |
|
| 22 | { |
||
| 23 | 1 | self::init($params); |
|
| 24 | 1 | return self::$instance->log($level, $message, $context); |
|
|
|
|||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * log event information into file |
||
| 29 | * |
||
| 30 | * @param array|string $message |
||
| 31 | * @param array $context |
||
| 32 | * @param array $params |
||
| 33 | * @return Log |
||
| 34 | */ |
||
| 35 | 1 | public static function makeLog($message, array $context = [], array $params = []) |
|
| 36 | { |
||
| 37 | 1 | self::init($params); |
|
| 38 | 1 | return self::$instance->makeLog($message, $context); |
|
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * set log option for all future executions of makeLog |
||
| 43 | * |
||
| 44 | * @param string $key |
||
| 45 | * @param mixed $val |
||
| 46 | * @return Log |
||
| 47 | */ |
||
| 48 | 2 | public static function setOption($key, $val) |
|
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * return all configuration or only given key value |
||
| 56 | * |
||
| 57 | * @param null|string $key |
||
| 58 | * @return array|mixed |
||
| 59 | */ |
||
| 60 | 2 | public static function getOption($key = null) |
|
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * create Log object if not exists |
||
| 68 | * |
||
| 69 | * @param array $params |
||
| 70 | */ |
||
| 71 | 2 | protected static function init(array $params = []) |
|
| 78 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.