Conditions | 3 |
Paths | 4 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
26 | 14 | 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 | 14 | if ($logger === null) { |
|
30 | 14 | $logger = new DummyLogger(); |
|
31 | } |
||
32 | 14 | $this->logger = $logger; |
|
33 | |||
34 | 14 | if ($messageContents !== null) { |
|
35 | 14 | $this->setPayload($messageContents); |
|
36 | } |
||
61 |