| Conditions | 3 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 18 | public function __construct(string $messageContents = null, LoggerInterface $logger = null) |
|
| 27 | { |
||
| 28 | // Set the logger before setting the payload so that we already have it in the object |
||
| 29 | 18 | if ($logger === null) { |
|
| 30 | 18 | $logger = new DummyLogger(); |
|
| 31 | } |
||
| 32 | 18 | $this->logger = $logger; |
|
| 33 | |||
| 34 | 18 | if ($messageContents !== null) { |
|
| 35 | 15 | $this->setPayload($messageContents); |
|
| 36 | } |
||
| 61 |