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