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.

NonSchoolDay::setDate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
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-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\ORM\Mapping as ORM;
24
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
25
26
/**
27
 * @ORM\Entity
28
 * @UniqueEntity(fields={"date"})
29
 */
30
class NonSchoolDay
31
{
32
    /**
33
     * @ORM\Id
34
     * @ORM\GeneratedValue
35
     * @ORM\Column(type="integer")
36
     * @var int
37
     */
38
    protected $id;
39
40
    /**
41
     * @ORM\Column(type="date")
42
     * @var \DateTime
43
     */
44
    protected $date;
45
46
    /**
47
     * @ORM\Column(type="string")
48
     * @var string
49
     */
50
    protected $name;
51
52
    public function __toString()
53
    {
54
        return $this->getName() ? $this->getName() . ' (' . $this->getDate()->format('d/m/Y') . ')' : '';
55
    }
56
57
    /**
58
     * Get id
59
     *
60
     * @return integer
61
     */
62
    public function getId()
63
    {
64
        return $this->id;
65
    }
66
67
    /**
68
     * Set date
69
     *
70
     * @param \DateTime $date
71
     *
72
     * @return NonSchoolDay
73
     */
74
    public function setDate($date)
75
    {
76
        $this->date = $date;
77
78
        return $this;
79
    }
80
81
    /**
82
     * Get date
83
     *
84
     * @return \DateTime
85
     */
86
    public function getDate()
87
    {
88
        return $this->date;
89
    }
90
91
    /**
92
     * Set name
93
     *
94
     * @param string $name
95
     *
96
     * @return NonSchoolDay
97
     */
98
    public function setName($name)
99
    {
100
        $this->name = $name;
101
102
        return $this;
103
    }
104
105
    /**
106
     * Get name
107
     *
108
     * @return string
109
     */
110
    public function getName()
111
    {
112
        return $this->name;
113
    }
114
}
115