Code Duplication    Length = 8-10 lines in 5 locations

src/Entity/AlternateDeliveryAddress.php 1 location

@@ 75-82 (lines=8) @@
72
    /**
73
     * @param mixed $name
74
     */
75
    public function setName($name)
76
    {
77
        if (strlen($name) > 35) {
78
            $name = substr($name, 0, 35);
79
        }
80
81
        $this->name = $name;
82
    }
83
}
84

src/Entity/InternationalForms.php 1 location

@@ 441-450 (lines=10) @@
438
     *
439
     * @return $this
440
     */
441
    public function setComments($comments)
442
    {
443
        if (strlen($comments) > 150) {
444
            $comments = substr($comments, 0, 150);
445
        }
446
447
        $this->comments = $comments;
448
449
        return $this;
450
    }
451
452
    /**
453
     * @return string

src/Entity/Product.php 3 locations

@@ 125-134 (lines=10) @@
122
     *
123
     * @return $this
124
     */
125
    public function setDescription1($description)
126
    {
127
        if (strlen($description) > 35) {
128
            $description = substr($description, 0, 35);
129
        }
130
131
        $this->description1 = $description;
132
133
        return $this;
134
    }
135
136
    /**
137
     * @return string
@@ 149-158 (lines=10) @@
146
     *
147
     * @return $this
148
     */
149
    public function setDescription2($description)
150
    {
151
        if (strlen($description) > 35) {
152
            $description = substr($description, 0, 35);
153
        }
154
155
        $this->description2 = $description;
156
157
        return $this;
158
    }
159
160
    /**
161
     * @return string
@@ 173-182 (lines=10) @@
170
     *
171
     * @return $this
172
     */
173
    public function setDescription3($description)
174
    {
175
        if (strlen($description) > 35) {
176
            $description = substr($description, 0, 35);
177
        }
178
179
        $this->description3 = $description;
180
181
        return $this;
182
    }
183
184
    /**
185
     * @return string