| Total Complexity | 3 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | trait FormatterTrait |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var string|callable |
||
| 25 | */ |
||
| 26 | private $msg; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var string|callable |
||
| 30 | */ |
||
| 31 | private $level; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param \Shrikeh\GuzzleMiddleware\TimerLogger\Timer\TimerInterface $timer A Timer to format |
||
| 35 | * @param \Psr\Http\Message\RequestInterface $request A Request to format |
||
| 36 | * @param \Psr\Http\Message\ResponseInterface|null $response The Response to format |
||
| 37 | * |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | private function msg( |
||
| 41 | TimerInterface $timer, |
||
| 42 | RequestInterface $request, |
||
| 43 | ResponseInterface $response = null |
||
| 44 | ) { |
||
| 45 | $msg = $this->msg; |
||
| 46 | |||
| 47 | return $msg($timer, $request, $response); |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param \Shrikeh\GuzzleMiddleware\TimerLogger\Timer\TimerInterface $timer A Timer to format |
||
| 52 | * @param \Psr\Http\Message\RequestInterface $request A Request to format |
||
| 53 | * @param \Psr\Http\Message\ResponseInterface|null $response The Response to format |
||
| 54 | * |
||
| 55 | * @return string |
||
| 56 | */ |
||
| 57 | private function level( |
||
| 69 | } |
||
| 70 | } |
||
| 71 |