Completed
Pull Request — master (#27)
by Dominik
05:54
created

SiteAlias   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 1
cbo 3
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 11 1
1
<?php
2
// Copyright 1999-2016. Parallels IP Holdings GmbH.
3
4
namespace PleskX\Api\Operator;
5
use PleskX\Api\Struct\SiteAlias as Struct;
6
7
class SiteAlias extends \PleskX\Api\Operator
8
{
9
/**
10
     * @param array $properties
11
     * @return Struct\Info
12
     */
13
    public function create(array $properties)
14
    {
15
        $packet = $this->_client->getPacket();
16
        $info = $packet->addChild($this->_wrapperTag)->addChild('create');
17
18
        $info->addChild('site-id', $properties['site-id']);
19
        $info->addChild('name', $properties['name']);
20
21
        $response = $this->_client->request($packet);
22
        return new Struct\Info($response);
23
    }
24
}
25