Code Duplication    Length = 8-8 lines in 2 locations

src/AppBundle/Entity/Suite.php 1 location

@@ 412-419 (lines=8) @@
409
     *
410
     * @return float
411
     */
412
    public function getPercentage(): float
413
    {
414
        if ($this->getEnabled() > 0) {
415
            return round($this->passed / $this->getEnabled() * 100);
416
        }
417
418
        return 0;
419
    }
420
421
    /**
422
     * Get suite status.

src/AppBundle/Entity/Campaign.php 1 location

@@ 494-501 (lines=8) @@
491
     *
492
     * @return float
493
     */
494
    public function getPercentage(): float
495
    {
496
        if ($this->getEnabled() !== 0) {
497
            return round($this->passed / $this->getEnabled() * 100);
498
        }
499
500
        return 0;
501
    }
502
503
    /**
504
     * Get campaign status.