| Total Complexity | 8 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace Rollbar\Payload; |
||
| 3 | class Trace implements ContentInterface |
||
| 4 | { |
||
| 5 | private $frames; |
||
| 6 | private $exception; |
||
| 7 | private $utilities; |
||
| 8 | |||
| 9 | public function __construct(array $frames, ExceptionInfo $exception) |
||
| 10 | { |
||
| 11 | $this->utilities = new \Rollbar\Utilities(); |
||
| 12 | $this->setFrames($frames); |
||
| 13 | $this->setException($exception); |
||
| 14 | } |
||
| 15 | |||
| 16 | public function getKey() |
||
| 17 | { |
||
| 18 | return 'trace'; |
||
| 19 | } |
||
| 20 | |||
| 21 | public function getFrames() |
||
| 22 | { |
||
| 23 | return $this->frames; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function setFrames(array $frames) |
||
| 27 | { |
||
| 28 | $this->frames = $frames; |
||
| 29 | return $this; |
||
| 30 | } |
||
| 31 | |||
| 32 | public function getException() |
||
| 33 | { |
||
| 34 | return $this->exception; |
||
| 35 | } |
||
| 36 | |||
| 37 | public function setException(ExceptionInfo $exception) |
||
| 38 | { |
||
| 39 | $this->exception = $exception; |
||
| 40 | return $this; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function serialize() |
||
| 50 | } |
||
| 51 | |||
| 52 | public function unserialize($serialized) |
||
| 55 | } |
||
| 56 | } |
||
| 57 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: