Completed
Pull Request — master (#98)
by Christopher
05:13
created

AtomDateConstructType::setBase()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace AlgoWeb\ODataMetadata\Atom;
4
5
/**
6
 * Class representing AtomDateConstructType
7
 *
8
 *
9
 * XSD Type: atomDateConstruct
10
 */
11
class AtomDateConstructType
12
{
13
14
    /**
15
     * @property \DateTime $__value
16
     */
17
    private $__value = null;
18
19
    /**
20
     * @property string $base
21
     */
22
    private $base = null;
23
24
    /**
25
     * @property string $lang
26
     */
27
    private $lang = null;
28
29
    /**
30
     * Construct
31
     *
32
     * @param \DateTime $value
33
     */
34
    public function __construct(\DateTime $value)
35
    {
36
        $this->value($value);
37
    }
38
39
    /**
40
     * Gets or sets the inner value
41
     *
42
     * @param \DateTime $value
0 ignored issues
show
Bug introduced by
There is no parameter named $value. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
43
     * @return \DateTime
44
     */
45
    public function value()
46
    {
47
        if ($args = func_get_args()) {
48
            $this->__value = $args[0];
49
        }
50
        return $this->__value;
51
    }
52
53
    /**
54
     * Gets a string value
55
     *
56
     * @return string
57
     */
58
    public function __toString()
59
    {
60
        return strval($this->__value);
61
    }
62
63
    /**
64
     * Gets as base
65
     *
66
     * @return string
67
     */
68
    public function getBase()
69
    {
70
        return $this->base;
71
    }
72
73
    /**
74
     * Sets a new base
75
     *
76
     * @param string $base
77
     * @return self
78
     */
79
    public function setBase($base)
80
    {
81
        $this->base = $base;
82
        return $this;
83
    }
84
85
    /**
86
     * Gets as lang
87
     *
88
     * @return string
89
     */
90
    public function getLang()
91
    {
92
        return $this->lang;
93
    }
94
95
    /**
96
     * Sets a new lang
97
     *
98
     * @param string $lang
99
     * @return self
100
     */
101
    public function setLang($lang)
102
    {
103
        $this->lang = $lang;
104
        return $this;
105
    }
106
}
107