Code Duplication    Length = 22-22 lines in 2 locations

src/models/decorators/server/Traffic95ResourceDecorator.php 1 location

@@ 15-36 (lines=22) @@
12
13
use Yii;
14
15
class Traffic95ResourceDecorator extends AbstractServerResourceDecorator
16
{
17
    public function displayTitle()
18
    {
19
        return $this->displayTitleWithDirection(Yii::t('hipanel:server:order', '95 percentile traffic'));
20
    }
21
22
    public function displayValue()
23
    {
24
        return Yii::t('yii', '{nFormatted} Mbps', ['nFormatted' => $this->getPrepaidQuantity()]);
25
    }
26
27
    public function displayUnit()
28
    {
29
        return Yii::t('hipanel', 'Mbps');
30
    }
31
32
    public function toUnit(): string
33
    {
34
        return 'Mbps';
35
    }
36
}
37

src/models/decorators/server/TrafficResourceDecorator.php 1 location

@@ 15-36 (lines=22) @@
12
13
use Yii;
14
15
class TrafficResourceDecorator extends AbstractServerResourceDecorator
16
{
17
    public function displayTitle()
18
    {
19
        return $this->displayTitleWithDirection(Yii::t('hipanel:server:order', 'Traffic'));
20
    }
21
22
    public function displayValue()
23
    {
24
        return Yii::t('yii', '{nFormatted} GB', ['nFormatted' => $this->getPrepaidQuantity()]);
25
    }
26
27
    public function displayUnit()
28
    {
29
        return Yii::t('hipanel', 'GB');
30
    }
31
32
    public function toUnit(): string
33
    {
34
        return 'gb';
35
    }
36
}
37