Code Duplication    Length = 10-11 lines in 2 locations

module/Jobs/src/Jobs/Entity/Job.php 2 locations

@@ 568-578 (lines=11) @@
565
        return $this->user;
566
    }
567
568
    public function unsetUser($removePermissions = true)
569
    {
570
        if ($this->user) {
571
            if ($removePermissions) {
572
                $this->getPermissions()->revoke($this->user, Permissions::PERMISSION_ALL);
573
            }
574
            $this->user=null;
575
        }
576
577
        return $this;
578
    }
579
580
    public function unsetOrganization($removePermissions = true)
581
    {
@@ 580-589 (lines=10) @@
577
        return $this;
578
    }
579
580
    public function unsetOrganization($removePermissions = true)
581
    {
582
        if($this->organization && $removePermissions){
583
            $this->getPermissions()->revoke($this->organization,Permissions::PERMISSION_ALL);
584
        }
585
586
        $this->organization = null;
587
588
        return $this;
589
    }
590
591
    /**
592
     * (non-PHPdoc)