Issues (213)

src/models/OpenvzPackage.php (1 issue)

1
<?php
2
/**
3
 * Server module for HiPanel
4
 *
5
 * @link      https://github.com/hiqdev/hipanel-module-server
6
 * @package   hipanel-module-server
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hipanel\modules\server\models;
12
13
use Yii;
14
15
/**
16
 * Class OpenvzPackage.
17
 * @property string $name
18
 */
19
class OpenvzPackage extends Package
20
{
21
    protected function getResourceValue_cpu()
22
    {
23
        $part = $this->getPartByType('cpu');
0 ignored issues
show
The method getPartByType() does not exist on hipanel\modules\server\models\OpenvzPackage. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

23
        /** @scrutinizer ignore-call */ 
24
        $part = $this->getPartByType('cpu');
Loading history...
24
        preg_match('/((\d+) MHz)$/i', $part->partno, $matches);
25
26
        return Yii::t('hipanel:server', '{0, number} MHz', $matches[2]);
27
    }
28
29
    protected function getResourceTitle_hdd()
30
    {
31
        return Yii::t('hipanel:server', 'HDD + SSD cache');
32
    }
33
34
    /** {@inheritdoc} */
35
    public function getLocations()
36
    {
37
        return [
38
            // RED ask
39
//            3 => Yii::t('hipanel:server', 'Netherlands, Amsterdam'),
40
            2 => Yii::t('hipanel:server', 'USA, Ashburn'),
41
        ];
42
    }
43
}
44