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.

Board::setLastPost()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the CCDNForum ForumBundle
5
 *
6
 * (c) CCDN (c) CodeConsortium <http://www.codeconsortium.com/>
7
 *
8
 * Available on github <http://www.github.com/codeconsortium/>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace CCDNForum\ForumBundle\Entity\Model;
15
16
use Doctrine\Common\Collections\ArrayCollection;
17
18
use CCDNForum\ForumBundle\Entity\Category as ConcreteCategory;
19
use CCDNForum\ForumBundle\Entity\Topic as ConcreteTopic;
20
21
abstract class Board
22
{
23
    /** @var Category $category */
24
    protected $category = null;
25
26
    /** @var ArrayCollection $topic */
27
    protected $topics;
28
29
    /** @var Post $lastPost */
30
    protected $lastPost;
31
32
    /**
33
     *
34
     * @access public
35
     */
36
    public function __construct()
37
    {
38
        // your own logic
39
        $this->topics = new ArrayCollection();
40
    }
41
42
    /**
43
     * Get category
44
     *
45
     * @return Category
46
     */
47
    public function getCategory()
48
    {
49
        return $this->category;
50
    }
51
52
    /**
53
     * Set category
54
     *
55
     * @param  Category $category
0 ignored issues
show
Documentation introduced by
Should the type for parameter $category not be null|ConcreteCategory?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
56
     * @return Board
57
     */
58
    public function setCategory(ConcreteCategory $category = null)
59
    {
60
        $this->category = $category;
61
62
        return $this;
63
    }
64
65
    /**
66
     * Get topics
67
     *
68
     * @return ArrayCollection
69
     */
70
    public function getTopics()
71
    {
72
        return $this->topics;
73
    }
74
75
    /**
76
     * Set topics
77
     *
78
     * @param  ArrayCollection $topics
0 ignored issues
show
Documentation introduced by
Should the type for parameter $topics not be null|ArrayCollection?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
79
     * @return Board
80
     */
81
    public function setTopics(ArrayCollection $topics = null)
82
    {
83
        $this->topics = $topics;
84
85
        return $this;
86
    }
87
88
    /**
89
     * Add topic
90
     *
91
     * @param  Topic $topic
0 ignored issues
show
Documentation introduced by
Consider making the type for parameter $topic a bit more specific; maybe use ConcreteTopic.
Loading history...
92
     * @return Board
93
     */
94
    public function addTopic(ConcreteTopic $topic)
95
    {
96
        $this->topics->add($topic);
97
98
        return $this;
99
    }
100
101
    /**
102
     * @param Topic $topic
0 ignored issues
show
Documentation introduced by
Consider making the type for parameter $topic a bit more specific; maybe use ConcreteTopic.
Loading history...
103
     *
104
     * @return $this
105
     */
106
    public function removeTopic(ConcreteTopic $topic)
107
    {
108
        $this->topics->removeElement($topic);
109
110
        return $this;
111
    }
112
113
    /**
114
     * Get last_post
115
     *
116
     * @return Post
117
     */
118
    public function getLastPost()
119
    {
120
        return $this->lastPost;
121
    }
122
123
    /**
124
     * Set last_post
125
     *
126
     * @param  Post  $lastPost
0 ignored issues
show
Documentation introduced by
Should the type for parameter $lastPost not be Post|null?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
127
     * @return Board
128
     */
129
    public function setLastPost($lastPost = null)
130
    {
131
        $this->lastPost = $lastPost;
132
133
        return $this;
134
    }
135
}
136