getSourceId()) { throw new RuntimeException("Attachment w/o a source ID."); } $this->attachment = $attachment; } public function getSourceId() : string { return $this->attachment->getSourceId(); } }