Code Duplication    Length = 9-9 lines in 2 locations

src/Service/MailService.php 1 location

@@ 318-326 (lines=9) @@
315
     * @param string|null $filename
316
     * @return $this
317
     */
318
    public function addAttachment($path, $filename = null)
319
    {
320
        if (isset($filename)) {
321
            $this->attachments[$filename] = $path;
322
        } else {
323
            $this->attachments[] = $path;
324
        }
325
        return $this;
326
    }
327
328
    /**
329
     * @param array $paths

src/Service/MailServiceMock.php 1 location

@@ 134-142 (lines=9) @@
131
     * @param null $filename
132
     * @return $this
133
     */
134
    public function addAttachment($path, $filename = null)
135
    {
136
        if (isset($filename)) {
137
            $this->attachments[$filename] = $path;
138
        } else {
139
            $this->attachments[] = $path;
140
        }
141
        return $this;
142
    }
143
144
    /**
145
     * @param array $paths