Completed
Pull Request — master (#168)
by
unknown
02:57
created

Profile::setId()   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
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the ONGR package.
5
 *
6
 * (c) NFQ Technologies UAB <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace ONGR\SettingsBundle\Document;
13
14
use JsonSerializable;
15
use ONGR\ElasticsearchBundle\Annotation as ES;
16
17
/**
18
 * Stores admin settings.
19
 *
20
 * @ES\Document(type="profiles")
21
 */
22
class Profile implements JsonSerializable
23
{
24
    /**
25
     * @var string
26
     *
27
     * @ES\Id()
28
     */
29
    private $id;
30
31
    /**
32
     * @var string
33
     *
34
     * @ES\Property(name="name", type="string", options={"analyzer"="standard"})
35
     */
36
    private $name;
37
38
    /**
39
     * @var string
40
     *
41
     * @ES\Property(name="description", type="string", options={"analyzer"="standard"})
42
     */
43
    private $description;
44
45
    /**
46
     * @return string
47
     */
48
    public function getId()
49
    {
50
        return $this->id;
51
    }
52
53
    /**
54
     * @param string $id
55
     */
56
    public function setId($id)
57
    {
58
        $this->id = $id;
59
    }
60
61
    /**
62
     * @return string
63
     */
64
    public function getName()
65
    {
66
        return $this->name;
67
    }
68
69
    /**
70
     * @param string $name
71
     */
72
    public function setName($name)
73
    {
74
        $this->name = $name;
75
    }
76
77
    /**
78
     * @return string
79
     */
80
    public function getDescription()
81
    {
82
        return $this->description;
83
    }
84
85
    /**
86
     * @param string $description
87
     */
88
    public function setDescription($description)
89
    {
90
        $this->description = $description;
91
    }
92
93
    public function jsonSerialize()
94
    {
95
        return [
96
            'id' => $this->id,
97
            'name' => $this->name,
98
            'description' => $this->description,
99
        ];
100
    }
101
}
102