Code Duplication    Length = 10-10 lines in 2 locations

src/AppBundle/Entity/Article.php 1 location

@@ 459-468 (lines=10) @@
456
     *
457
     * @param UploadedFile $file
458
     */
459
    public function setFile(UploadedFile $file = null)
460
    {
461
        $this->file = $file;
462
        if (isset($this->picture)) {
463
            $this->temp = $this->picture;
464
            $this->picture = null;
465
        } else {
466
            $this->picture = 'initial';
467
        }
468
    }
469
470
    /**
471
     * Get file.

src/AppBundle/Entity/User.php 1 location

@@ 450-459 (lines=10) @@
447
     *
448
     * @param UploadedFile $file
449
     */
450
    public function setFile(UploadedFile $file = null)
451
    {
452
        $this->file = $file;
453
        if (isset($this->photo)) {
454
            $this->temp = $this->photo;
455
            $this->photo = null;
456
        } else {
457
            $this->photo = 'initial';
458
        }
459
    }
460
461
    /**
462
     * Get file.