Conditions | 4 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4.074 |
Changes | 0 |
1 | <?php |
||
13 | 3 | public function __construct(string $type, ?string $domain = null) |
|
14 | { |
||
15 | 3 | $this->parser = new LogParser(); |
|
16 | 3 | $this->parser->setFormat(class_exists($type) ? $type::FORMAT : $type); |
|
17 | 3 | if ($domain !== null) { |
|
18 | $this->parser->setDomain($domain); |
||
19 | } |
||
20 | 3 | $this->parser->setType(class_exists($type) ? $type : LogLine::class); |
|
21 | 3 | } |
|
71 |