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/Product.php 3 locations

@@ 115-124 (lines=10) @@
112
     *
113
     * @return $this
114
     */
115
    public function setDescription1($description)
116
    {
117
        if (strlen($description) > 35) {
118
            $description = substr($description, 0, 35);
119
        }
120
121
        $this->description1 = $description;
122
123
        return $this;
124
    }
125
126
    /**
127
     * @return string
@@ 139-148 (lines=10) @@
136
     *
137
     * @return $this
138
     */
139
    public function setDescription2($description)
140
    {
141
        if (strlen($description) > 35) {
142
            $description = substr($description, 0, 35);
143
        }
144
145
        $this->description2 = $description;
146
147
        return $this;
148
    }
149
150
    /**
151
     * @return string
@@ 163-172 (lines=10) @@
160
     *
161
     * @return $this
162
     */
163
    public function setDescription3($description)
164
    {
165
        if (strlen($description) > 35) {
166
            $description = substr($description, 0, 35);
167
        }
168
169
        $this->description3 = $description;
170
171
        return $this;
172
    }
173
174
    /**
175
     * @return string

src/Entity/InternationalForms.php 1 location

@@ 430-439 (lines=10) @@
427
     *
428
     * @return $this
429
     */
430
    public function setComments($comments)
431
    {
432
        if (strlen($comments) > 150) {
433
            $comments = substr($comments, 0, 150);
434
        }
435
436
        $this->comments = $comments;
437
438
        return $this;
439
    }
440
441
    /**
442
     * @return string