Conditions | 3 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3.1825 |
Changes | 0 |
1 | <?php |
||
37 | 5 | public function __construct($databaseRecord, $logs = self::SUPPRESS_LOGS, $urls = self::SUPPRESS_URLS) |
|
38 | { |
||
39 | 5 | parent::__construct($databaseRecord); |
|
40 | |||
41 | 4 | if (is_array($urls)) { |
|
42 | $this->urls = array_filter($urls, function($elt) { |
||
43 | return $elt instanceof Url; |
||
44 | }); |
||
45 | } |
||
46 | |||
47 | 4 | if (is_array($logs)) { |
|
48 | 2 | $this->logs = array_filter($logs, function ($elt) { |
|
49 | 2 | return $elt instanceof Log; |
|
50 | 2 | }); |
|
51 | } |
||
52 | 4 | } |
|
53 | } |
||
54 |