Completed
Push — develop ( aedce0...9c12e7 )
by
unknown
07:11
created

Classifications::setIndustries()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @license MIT
7
 * @copyright  2013 - 2016 Cross Solution <http://cross-solution.de>
8
 */
9
  
10
/** */
11
namespace Jobs\Entity;
12
13
use Core\Entity\ClonePropertiesTrait;
14
use Core\Entity\EntityInterface;
15
use Core\Entity\EntityTrait;
16
use Core\Entity\Tree\EmbeddedLeafs;
17
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
18
19
/**
20
 * Stores the classifications (categories) of a job.
21
 *
22
 * @ODM\EmbeddedDocument
23
 * @author Mathias Gelhausen <[email protected]>
24
 * @since 0,29
25
 */
26
class Classifications implements EntityInterface
27
{
28
29
    use EntityTrait, ClonePropertiesTrait;
30
31
    private $cloneProperties = [
0 ignored issues
show
Unused Code introduced by
The property $cloneProperties is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
32
        'professions', 'employmentTypes', 'industries'
33
    ];
34
35
    /**
36
     * The professions.
37
     *
38
     * @ODM\EmbedOne(targetDocument="\Core\Entity\Tree\EmbeddedLeafs")
39
     * @var EmbeddedLeafs
40
     */
41
    private $professions;
42
43
    /**
44
     * The industries.
45
     *
46
     * @ODM\EmbedOne(targetDocument="\Core\Entity\Tree\EmbeddedLeafs")
47
     * @var EmbeddedLeafs
48
     */
49
    private $industries;
50
51
    /**
52
     * The employment types.
53
     *
54
     * @ODM\EmbedOne(targetDocument="\Core\Entity\Tree\EmbeddedLeafs")
55
     * @var EmbeddedLeafs
56
     */
57
    private $employmentTypes;
58
59
    /**
60
     * Set the employment types.
61
     *
62
     * @param \Core\Entity\Tree\EmbeddedLeafs $employmentTypes
63
     *
64
     * @return self
65
     */
66
    public function setEmploymentTypes($employmentTypes)
67
    {
68
        $this->employmentTypes = $employmentTypes;
69
70
        return $this;
71
    }
72
73
    /**
74
     * Get the employment types.
75
     *
76
     * @return \Core\Entity\Tree\EmbeddedLeafs
77
     */
78
    public function getEmploymentTypes()
79
    {
80
        if (!$this->employmentTypes) {
81
            $this->setEmploymentTypes(new EmbeddedLeafs());
82
        }
83
84
        return $this->employmentTypes;
85
    }
86
87
    /**
88
     * Set the professions.
89
     *
90
     * @param \Core\Entity\Tree\EmbeddedLeafs $professions
91
     *
92
     * @return self
93
     */
94
    public function setProfessions($professions)
95
    {
96
        $this->professions = $professions;
97
98
        return $this;
99
    }
100
101
    /**
102
     * Get the professions.
103
     *
104
     * @return \Core\Entity\Tree\EmbeddedLeafs
105
     */
106
    public function getProfessions()
107
    {
108
        if (!$this->professions) {
109
            $this->setProfessions(new EmbeddedLeafs());
110
        }
111
112
        return $this->professions;
113
    }
114
115
    /**
116
     * Set the industries.
117
     *
118
     * @param \Core\Entity\Tree\EmbeddedLeafs $industries
119
     *
120
     * @return self
121
     */
122
    public function setIndustries($industries)
123
    {
124
        $this->industries = $industries;
125
126
        return $this;
127
    }
128
129
    /**
130
     * Get the professions.
131
     *
132
     * @return \Core\Entity\Tree\EmbeddedLeafs
133
     */
134
    public function getIndustries()
135
    {
136
        if (!$this->industries) {
137
            $this->setIndustries(new EmbeddedLeafs());
138
        }
139
140
        return $this->industries;
141
    }
142
143
144
}