Code Duplication    Length = 12-12 lines in 4 locations

src/Api/Operator/Certificate.php 1 location

@@ 15-26 (lines=12) @@
12
     *
13
     * @return Struct\Info
14
     */
15
    public function generate($properties)
16
    {
17
        $packet = $this->_client->getPacket();
18
        $info = $packet->addChild($this->_wrapperTag)->addChild('generate')->addChild('info');
19
20
        foreach ($properties as $name => $value) {
21
            $info->addChild($name, $value);
22
        }
23
24
        $response = $this->_client->request($packet);
25
26
        return new Struct\Info($response);
27
    }
28
}
29

src/Api/Operator/Customer.php 1 location

@@ 15-26 (lines=12) @@
12
     *
13
     * @return Struct\Info
14
     */
15
    public function create($properties)
16
    {
17
        $packet = $this->_client->getPacket();
18
        $info = $packet->addChild($this->_wrapperTag)->addChild('add')->addChild('gen_info');
19
20
        foreach ($properties as $name => $value) {
21
            $info->addChild($name, $value);
22
        }
23
24
        $response = $this->_client->request($packet);
25
26
        return new Struct\Info($response);
27
    }
28
29
    /**

src/Api/Operator/DnsTemplate.php 1 location

@@ 17-28 (lines=12) @@
14
     *
15
     * @return Struct\Info
16
     */
17
    public function create(array $properties)
18
    {
19
        $packet = $this->_client->getPacket();
20
        $info = $packet->addChild($this->_wrapperTag)->addChild('add_rec');
21
22
        unset($properties['site-id'], $properties['site-alias-id']);
23
        foreach ($properties as $name => $value) {
24
            $info->addChild($name, $value);
25
        }
26
27
        return new Struct\Info($this->_client->request($packet));
28
    }
29
30
    /**
31
     * @param string $field

src/Api/Operator/Reseller.php 1 location

@@ 15-26 (lines=12) @@
12
     *
13
     * @return Struct\Info
14
     */
15
    public function create($properties)
16
    {
17
        $packet = $this->_client->getPacket();
18
        $info = $packet->addChild($this->_wrapperTag)->addChild('add')->addChild('gen-info');
19
20
        foreach ($properties as $name => $value) {
21
            $info->addChild($name, $value);
22
        }
23
24
        $response = $this->_client->request($packet);
25
26
        return new Struct\Info($response);
27
    }
28
29
    /**