Completed
Push — master ( 25710f...56c545 )
by Akram
02:12
created

System::get()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2.032

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 9
ccs 4
cts 5
cp 0.8
rs 9.6666
cc 2
eloc 6
nc 2
nop 2
crap 2.032
1
<?php
2
3
namespace Rundeck\Resources;
4
5
use Rundeck\HttpClient;
6
7
/**
8
 * Class System /api/V/system/
9
 * @package Rundeck\Resources
10
 */
11
class System extends Resource
12
{
13
14
    /**
15
     * @var array
16
     */
17
    protected $actions = [
18
        "info" => ["xml"], // /api/V/system/info
19
        "logstorage" => ["xml"], // /api/V/system/logstorage
20
        "logstorage/incomplete" => ["xml"] // /api/V/system/logstorage/incomplete
21
    ];
22
23
    /**
24
     * @param HttpClient $client
25
     * @param null $name
26
     */
27 9
    public function __construct(HttpClient $client, $name = null)
28
    {
29 9
        $this->name = $name;
30 9
        $this->client = $client;
0 ignored issues
show
Documentation Bug introduced by
It seems like $client of type object<Rundeck\HttpClient> is incompatible with the declared type object<Rundeck\Resources\HttpClient> of property $client.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
31 9
    }
32
}
33