Ip   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 13 2
1
<?php
2
// Copyright 1999-2021. Plesk International GmbH.
3
4
namespace PleskX\Api\Operator;
5
6
use PleskX\Api\Struct\Ip as Struct;
7
8
class Ip extends \PleskX\Api\Operator
9
{
10
    /**
11
     * @return Struct\Info[]
12
     */
13
    public function get()
14
    {
15
        $ips = [];
16
        $packet = $this->_client->getPacket();
17
        $packet->addChild($this->_wrapperTag)->addChild('get');
18
        $response = $this->_client->request($packet);
19
20
        foreach ($response->addresses->ip_info as $ipInfo) {
21
            $ips[] = new Struct\Info($ipInfo);
22
        }
23
24
        return $ips;
25
    }
26
}
27