Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
35 | 6 | public function __construct($url, ?bool $reusable = null, $type = Attachment::TYPE_FILE) |
|
36 | { |
||
37 | 6 | parent::__construct($type); |
|
38 | |||
39 | 6 | if ($this->isAttachmentId($url)) { |
|
40 | 1 | $this->attachmentId = $url; |
|
41 | } else { |
||
42 | 5 | $this->isValidUrl($url); |
|
43 | 5 | $this->url = $url; |
|
44 | } |
||
45 | |||
46 | 6 | $this->reusable = $reusable; |
|
47 | 6 | } |
|
89 |