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

Crawling::setState()   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
        'state' => 'state',
32
        'details' => 'details',
33
    ];
34
35
    /**
36
     * Crawling constructor.
37
     *
38
     * @param \SimpleXMLIterator $data
39
     */
40
    public function __construct(\SimpleXMLIterator $data)
41
    {
42
        $this->fromXml($data);
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getState()
49
    {
50
        return $this->state;
51
    }
52
53
    /**
54
     * @param $state
55
     */
56
    public function setState($state)
57
    {
58
        $this->state = $state;
59
    }
60
61
    /**
62
     * @return string|null
63
     */
64
    public function getDetails()
65
    {
66
        return $this->details;
67
    }
68
69
    /**
70
     * @param string $details
71
     */
72
    public function setDetails($details)
73
    {
74
        $this->details = $details;
75
    }
76
}
77