ReceiverProperty::setRequired()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Victoire\Bundle\BusinessEntityBundle\Entity;
4
5
class ReceiverProperty
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
6
{
7
    protected $fieldName = null;
8
9
    protected $required = false;
10
11
    /**
12
     * @return null
13
     */
14
    public function getFieldName()
15
    {
16
        return $this->fieldName;
17
    }
18
19
    /**
20
     * @param null $fieldName
21
     */
22
    public function setFieldName($fieldName)
23
    {
24
        $this->fieldName = $fieldName;
25
    }
26
27
    /**
28
     * @return bool
29
     */
30
    public function isRequired()
31
    {
32
        return $this->required;
33
    }
34
35
    /**
36
     * @param bool $required
37
     */
38
    public function setRequired($required)
39
    {
40
        $this->required = $required;
41
    }
42
43
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$array" missing
Loading history...
44
     * setState (convert from array to object).
45
     *
46
     * @return string
47
     */
48
    public static function __set_state($array)
49
    {
50
        $receiverProperty = new self();
51
        $receiverProperty->setFieldName($array['fieldName']);
52
        $receiverProperty->setRequired($array['required']);
53
54
        return $receiverProperty;
55
    }
56
}
57