Actor::setSource()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
/*
3
  ÁTICA - Aplicación web para la gestión documental de centros educativos
4
5
  Copyright (C) 2015-2017: Luis Ramón López López
6
7
  This program is free software: you can redistribute it and/or modify
8
  it under the terms of the GNU Affero General Public License as published by
9
  the Free Software Foundation, either version 3 of the License, or
10
  (at your option) any later version.
11
12
  This program is distributed in the hope that it will be useful,
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
  GNU Affero General Public License for more details.
16
17
  You should have received a copy of the GNU Affero General Public License
18
  along with this program.  If not, see [http://www.gnu.org/licenses/].
19
*/
20
21
namespace AppBundle\Entity;
22
23
use Doctrine\ORM\Mapping as ORM;
24
25
/**
26
 * @ORM\Entity
27
 */
28
class Actor
29
{
30
    /**
31
     * @ORM\Id
32
     * @ORM\ManyToOne(targetEntity="Element", inversedBy="actors")
33
     * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
34
     * @var Element
35
     */
36
    private $source;
37
38
    /**
39
     * @ORM\Id
40
     * @ORM\ManyToOne(targetEntity="Profile")
41
     * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
42
     * @var Profile
43
     */
44
    private $profile;
45
46
    /**
47
     * Set source
48
     *
49
     * @param Element $source
50
     *
51
     * @return Actor
52
     */
53
    public function setSource(Element $source)
54
    {
55
        $this->source = $source;
56
57
        return $this;
58
    }
59
60
    /**
61
     * Get source
62
     *
63
     * @return Element
64
     */
65
    public function getSource()
66
    {
67
        return $this->source;
68
    }
69
70
    /**
71
     * Get role
72
     *
73
     * @return Profile
74
     */
75
    public function getProfile()
76
    {
77
        return $this->profile;
78
    }
79
80
    /**
81
     * Set role
82
     *
83
     * @param Profile $profile
84
     * @return Actor
85
     */
86
    public function setProfile(Profile $profile)
87
    {
88
        $this->profile = $profile;
89
        return $this;
90
    }
91
92
}
93