Code Duplication    Length = 7-8 lines in 3 locations

src/Core/Port/Notification/Client/Email/EmailAttachment.php 3 locations

@@ 63-70 (lines=8) @@
60
    /**
61
     * @throws \Acme\App\Core\Port\Notification\Client\Email\Exception\EmailAttachmentException
62
     */
63
    protected function setFileName(string $fileName): void
64
    {
65
        if (!\is_string($fileName) || empty($fileName)) {
66
            throw new EmailAttachmentException(self::ERROR_INVALID_FILE_NAME);
67
        }
68
69
        $this->fileName = $fileName;
70
    }
71
72
    public function getContentType(): string
73
    {
@@ 80-87 (lines=8) @@
77
    /**
78
     * @throws \Acme\App\Core\Port\Notification\Client\Email\Exception\EmailAttachmentException
79
     */
80
    protected function setContentType(string $contentType): void
81
    {
82
        if (!\is_string($contentType) || empty($contentType)) {
83
            throw new EmailAttachmentException(self::ERROR_INVALID_CONTENT_TYPE);
84
        }
85
86
        $this->contentType = $contentType;
87
    }
88
89
    public function getContent(): string
90
    {
@@ 97-103 (lines=7) @@
94
    /**
95
     * @throws EmailAttachmentException
96
     */
97
    protected function setContent(string $content): void
98
    {
99
        if (!is_string($content) || empty($content)) {
100
            throw new EmailAttachmentException(self::ERROR_INVALID_CONTENT);
101
        }
102
        $this->content = $content;
103
    }
104
105
    /**
106
     * {@inheritdoc}