Code Duplication    Length = 7-7 lines in 2 locations

lib/Model/Paste.php 2 locations

@@ 190-196 (lines=7) @@
187
     * @param string $attachment
188
     * @throws Exception
189
     */
190
    public function setAttachment($attachment)
191
    {
192
        if (!$this->_conf->getKey('fileupload') || !Sjcl::isValid($attachment)) {
193
            throw new Exception('Invalid attachment.', 71);
194
        }
195
        $this->_data->meta->attachment = $attachment;
196
    }
197
198
    /**
199
     * Set paste's attachment name.
@@ 205-211 (lines=7) @@
202
     * @param string $attachmentname
203
     * @throws Exception
204
     */
205
    public function setAttachmentName($attachmentname)
206
    {
207
        if (!$this->_conf->getKey('fileupload') || !Sjcl::isValid($attachmentname)) {
208
            throw new Exception('Invalid attachment.', 72);
209
        }
210
        $this->_data->meta->attachmentname = $attachmentname;
211
    }
212
213
    /**
214
     * Set paste expiration.