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