Issues (107)

src/Server.php (3 issues)

1
<?php
2
3
namespace Puerari\Cwp;
4
5
/**
6
 * @trait Server
7
 * @package Puerari\Cwp
8
 * @author Leandro Puerari <[email protected]>
9
 */
10
trait Server
11
{
12
    /**
13
     * @return string|bool: false on failure, result on success (JSON / XML)
14
     * status -> OK, mjs -> openvz
15
     */
16
    public function listServerType()
17
    {
18
        $this->data['debug'] = $this->debug;
0 ignored issues
show
Bug Best Practice introduced by
The property data does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
19
        $this->data['action'] = 'list';
20
        $this->cwpuri = 'typeserver';
0 ignored issues
show
Bug Best Practice introduced by
The property cwpuri does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
21
        return $this->execCurl();
0 ignored issues
show
It seems like execCurl() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

21
        return $this->/** @scrutinizer ignore-call */ execCurl();
Loading history...
22
    }
23
}
24