Code Duplication    Length = 13-13 lines in 2 locations

src/AppBundle/DTO/TestDTO.php 1 location

@@ 183-195 (lines=13) @@
180
     *
181
     * @return TestDTO
182
     */
183
    public function setFullclassname(string $fullclassname): self
184
    {
185
        if (substr_count($fullclassname, '.') > 0) {
186
            $index = strrpos($fullclassname, '.');
187
            $this->setPackage(substr($fullclassname, 0, $index));
188
            $this->setClassName(substr($fullclassname, $index + 1));
189
        } else {
190
            $this->setPackage(Test::DEFAULT_PACKAGE);
191
            $this->setClassName($fullclassname);
192
        }
193
194
        return $this;
195
    }
196
197
    /**
198
     * Set test status.

src/AppBundle/Entity/Test.php 1 location

@@ 301-313 (lines=13) @@
298
     *
299
     * @return Test
300
     */
301
    public function setFullclassname(string $fullClassname): self
302
    {
303
        if (substr_count($fullClassname, '.') > 0) {
304
            $index = strrpos($fullClassname, '.');
305
            $this->setPackage(substr($fullClassname, 0, $index));
306
            $this->setClassname(substr($fullClassname, $index + 1));
307
        } else {
308
            $this->setPackage(self::DEFAULT_PACKAGE);
309
            $this->setClassname($fullClassname);
310
        }
311
312
        return $this;
313
    }
314
315
    /**
316
     * Set test to passed.