| Total Complexity | 10 |
| Total Lines | 115 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class LogMessage |
||
| 6 | { |
||
| 7 | /** @var string */ |
||
| 8 | protected $message; |
||
| 9 | |||
| 10 | /** @var string */ |
||
| 11 | protected $level; |
||
| 12 | |||
| 13 | /** @var \EightPoints\Bundle\GuzzleBundle\Log\LogRequest */ |
||
| 14 | protected $request; |
||
| 15 | |||
| 16 | /** @var \EightPoints\Bundle\GuzzleBundle\Log\LogResponse */ |
||
| 17 | protected $response; |
||
| 18 | |||
| 19 | /** @var null|float */ |
||
| 20 | protected $transferTime; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param string $message |
||
| 24 | */ |
||
| 25 | public function __construct($message) |
||
| 26 | { |
||
| 27 | $this->message = $message; |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Set log level |
||
| 32 | * |
||
| 33 | * @param string $level |
||
| 34 | * |
||
| 35 | * @return void |
||
| 36 | */ |
||
| 37 | public function setLevel($level) |
||
| 38 | { |
||
| 39 | $this->level = $level; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Returning log level |
||
| 44 | * |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | public function getLevel() |
||
| 48 | { |
||
| 49 | return $this->level; |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Returning log message |
||
| 54 | * |
||
| 55 | * @return string |
||
| 56 | */ |
||
| 57 | public function getMessage() |
||
| 58 | { |
||
| 59 | return $this->message; |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Set Log Request |
||
| 64 | * |
||
| 65 | * @param \EightPoints\Bundle\GuzzleBundle\Log\LogRequest $value |
||
| 66 | * |
||
| 67 | * @return void |
||
| 68 | */ |
||
| 69 | public function setRequest(LogRequest $value) |
||
| 70 | { |
||
| 71 | $this->request = $value; |
||
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * Get Log Request |
||
| 76 | * |
||
| 77 | * @return \EightPoints\Bundle\GuzzleBundle\Log\LogRequest |
||
| 78 | */ |
||
| 79 | public function getRequest() |
||
| 80 | { |
||
| 81 | return $this->request; |
||
| 82 | } |
||
| 83 | |||
| 84 | /** |
||
| 85 | * Set Log Response |
||
| 86 | * |
||
| 87 | * @param \EightPoints\Bundle\GuzzleBundle\Log\LogResponse $value |
||
| 88 | * |
||
| 89 | * @return void |
||
| 90 | */ |
||
| 91 | public function setResponse(LogResponse $value) |
||
| 92 | { |
||
| 93 | $this->response = $value; |
||
| 94 | } |
||
| 95 | |||
| 96 | /** |
||
| 97 | * Get Log Response |
||
| 98 | * |
||
| 99 | * @return \EightPoints\Bundle\GuzzleBundle\Log\LogResponse |
||
| 100 | */ |
||
| 101 | public function getResponse() |
||
| 104 | } |
||
| 105 | |||
| 106 | /** |
||
| 107 | * @return float|null |
||
| 108 | */ |
||
| 109 | public function getTransferTime() |
||
| 110 | { |
||
| 111 | return $this->transferTime; |
||
| 112 | } |
||
| 113 | |||
| 114 | /** |
||
| 115 | * @param float|null $transferTime |
||
| 116 | */ |
||
| 117 | public function setTransferTime($transferTime) |
||
| 120 | } |
||
| 121 | } |
||
| 122 |