Passed
Push — master ( 89417d...5e4d51 )
by Leandro
01:55
created

Server   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 12
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A listServerType() 0 6 1
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
Bug introduced by
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