Code Duplication    Length = 13-13 lines in 2 locations

src/AppBundle/DTO/TestDTO.php 1 location

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

src/AppBundle/Entity/Test.php 1 location

@@ 287-299 (lines=13) @@
284
     *
285
     * @return Test
286
     */
287
    public function setFullclassname(string $fullClassname): Test
288
    {
289
        if (substr_count($fullClassname, '.') > 0) {
290
            $index = strrpos($fullClassname, '.');
291
            $this->setPackage(substr($fullClassname, 0, $index));
292
            $this->setClassname(substr($fullClassname, $index + 1));
293
        } else {
294
            $this->setPackage(self::DEFAULT_PACKAGE);
295
            $this->setClassname($fullClassname);
296
        }
297
298
        return $this;
299
    }
300
301
    /**
302
     * Set test to passed.