GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( d38d17...067126 )
by Luis Ramón
03:07
created

WorkTutor   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 138
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 10
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 138
rs 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __toString() 0 4 1
A getId() 0 4 1
A setPerson() 0 6 1
A getPerson() 0 4 1
A setCompany() 0 6 1
A getCompany() 0 4 1
A addAgreement() 0 6 1
A removeAgreement() 0 4 1
A getAgreements() 0 4 1
1
<?php
2
/*
3
  ÁTICA - Aplicación web para la gestión documental de centros educativos
4
5
  Copyright (C) 2015-2016: 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\Common\Collections\Collection;
24
use Doctrine\ORM\Mapping as ORM;
25
26
/**
27
 * @ORM\Entity
28
 */
29
class WorkTutor
30
{
31
    /**
32
     * @ORM\Id
33
     * @ORM\GeneratedValue
34
     * @ORM\Column(type="integer")
35
     */
36
    protected $id;
37
38
    /**
39
     * @ORM\OneToOne(targetEntity="Person")
40
     * @ORM\JoinColumn(nullable=false)
41
     * @var Person
42
     */
43
    protected $person;
44
45
    /**
46
     * @ORM\ManyToOne(targetEntity="Company")
47
     * @var Company
48
     */
49
    protected $company;
50
51
    /**
52
     * @ORM\OneToMany(targetEntity="Agreement", mappedBy="workTutor")
53
     * @var Collection
54
     */
55
    protected $agreements;
56
57
    /**
58
     * Constructor
59
     */
60
    public function __construct()
61
    {
62
        $this->agreements = new \Doctrine\Common\Collections\ArrayCollection();
63
    }
64
65
    /**
66
     * Returns the tutor's display name
67
     *
68
     * @return string
69
     */
70
    public function __toString()
71
    {
72
        return (string) $this->person;
73
    }
74
75
    /**
76
     * Get id
77
     *
78
     * @return int
79
     */
80
    public function getId()
81
    {
82
        return $this->id;
83
    }
84
85
    /**
86
     * Set person
87
     *
88
     * @param Person $person
89
     *
90
     * @return WorkTutor
91
     */
92
    public function setPerson(Person $person)
93
    {
94
        $this->person = $person;
95
96
        return $this;
97
    }
98
99
    /**
100
     * Get person
101
     *
102
     * @return Person
103
     */
104
    public function getPerson()
105
    {
106
        return $this->person;
107
    }
108
109
    /**
110
     * Set company
111
     *
112
     * @param Company $company
113
     *
114
     * @return WorkTutor
115
     */
116
    public function setCompany(Company $company = null)
117
    {
118
        $this->company = $company;
119
120
        return $this;
121
    }
122
123
    /**
124
     * Get company
125
     *
126
     * @return Company
127
     */
128
    public function getCompany()
129
    {
130
        return $this->company;
131
    }
132
133
    /**
134
     * Add agreement
135
     *
136
     * @param Agreement $agreement
137
     *
138
     * @return WorkTutor
139
     */
140
    public function addAgreement(Agreement $agreement)
141
    {
142
        $this->agreements[] = $agreement;
143
144
        return $this;
145
    }
146
147
    /**
148
     * Remove agreement
149
     *
150
     * @param Agreement $agreement
151
     */
152
    public function removeAgreement(Agreement $agreement)
153
    {
154
        $this->agreements->removeElement($agreement);
155
    }
156
157
    /**
158
     * Get agreements
159
     *
160
     * @return \Doctrine\Common\Collections\Collection
161
     */
162
    public function getAgreements()
163
    {
164
        return $this->agreements;
165
    }
166
}
167