| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 37 | 8 | public function __construct(array $record, ErrorInterface $error = null) |
|
| 38 | { |
||
| 39 | 8 | $this->record = $record; |
|
| 40 | 8 | $this->error = $error; |
|
| 41 | |||
| 42 | 8 | $message = ($this->error !== null) ? $this->error->getMessage() : $this->record['message']; |
|
| 43 | 8 | parent::__construct(sprintf('*%s:* %s', $this->record['level_name'], $message)); |
|
| 44 | |||
| 45 | 8 | $this->setColour($this->getColour()); |
|
| 46 | 8 | } |
|
| 47 | |||
| 68 |