Completed
Pull Request — master (#162)
by
unknown
08:31
created

Crawling::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
namespace Yandex\Webmaster\Models;
3
4
use Yandex\Common\Model;
5
6
/**
7
 * Class Crawling
8
 *
9
 * @package Yandex\Webmaster\Models
10
 */
11
class Crawling extends Model
12
{
13
    /**
14
     * @var string $state
15
     */
16
    protected $state = null;
17
    /**
18
     * @var string $details
19
     */
20
    protected $details = null;
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    protected $mappingClasses = [];
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    protected $propNameMap = [];
31
32
    /**
33
     * Crawling constructor.
34
     *
35
     * @param \SimpleXMLIterator $data
36
     */
37
    public function __construct(\SimpleXMLIterator $data)
38
    {
39
        $this->fromXml($data);
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getState()
46
    {
47
        return $this->state;
48
    }
49
50
    /**
51
     * @param $state
52
     */
53
    public function setState($state)
54
    {
55
        $this->state = $state;
56
    }
57
58
    /**
59
     * @return string|null
60
     */
61
    public function getDetails()
62
    {
63
        return $this->details;
64
    }
65
66
    /**
67
     * @param string $details
68
     */
69
    public function setDetails($details)
70
    {
71
        $this->details = $details;
72
    }
73
}
74