Completed
Pull Request — master (#161)
by
unknown
07:58
created

GetHostsResponse::getHosts()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 0
dl 4
loc 4
rs 10
1
<?php
2
3
namespace Yandex\Webmaster\Models;
4
5
use Yandex\Metrica\Management\Models\Accounts;
6
use Yandex\Common\Model;
7
8
/**
9
 * Class GetHostsResponse
10
 *
11
 * @package Yandex\Webmaster\Models
12
 */
13 View Code Duplication
class GetHostsResponse extends Model
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
14
{
15
16
    /**
17
     * @var Hosts $hosts
18
     */
19
    protected $hosts = null;
20
21
    /**
22
     * {@inheritdoc}
23
     */
24
    protected $mappingClasses = [
25
        'hosts' => 'Yandex\Webmaster\Models\Hosts',
26
    ];
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    protected $propNameMap = [
32
        'hosts' => 'hostlist',
33
    ];
34
35
    /**
36
     * GetHostsResponse constructor.
37
     *
38
     * @param \SimpleXMLIterator $data
39
     */
40
    public function __construct(\SimpleXMLIterator $data)
41
    {
42
        $this->fromXml($data);
43
    }
44
45
    /**
46
     * Get Hosts
47
     *
48
     * @return Hosts
49
     */
50
    public function getHosts()
51
    {
52
        return $this->hosts;
53
    }
54
55
    /**
56
     * Set Hosts
57
     *
58
     * @param Hosts $hosts
59
     * @return $this
60
     */
61
    public function setHosts($hosts)
62
    {
63
        $this->hosts = $hosts;
64
65
        return $this;
66
    }
67
}
68