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

@@ 239-251 (lines=13) @@
236
     *
237
     * @return Test
238
     */
239
    public function setFullclassname(string $fullClassname): Test
240
    {
241
        if (substr_count($fullClassname, '.') > 0) {
242
            $index = strrpos($fullClassname, '.');
243
            $this->setPackage(substr($fullClassname, 0, $index));
244
            $this->setClassname(substr($fullClassname, $index + 1));
245
        } else {
246
            $this->setPackage(self::DEFAULT_PACKAGE);
247
            $this->setClassname($fullClassname);
248
        }
249
250
        return $this;
251
    }
252
253
    /**
254
     * Set test to passed.