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.

UserPostResponseEvent::getResponse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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\Component\Dispatcher\Event;
15
16
use Symfony\Component\HttpFoundation\Request;
17
use Symfony\Component\HttpFoundation\Response;
18
19
use CCDNForum\ForumBundle\Entity\Post;
20
21
/**
22
 *
23
 * @category CCDNForum
24
 * @package  ForumBundle
25
 *
26
 * @author   Reece Fowell <[email protected]>
27
 * @license  http://opensource.org/licenses/MIT MIT
28
 * @version  Release: 2.0
29
 * @link     https://github.com/codeconsortium/CCDNForumForumBundle
30
 *
31
 */
32
class UserPostResponseEvent extends UserPostEvent
33
{
34
    /**
35
     *
36
     * @access protected
37
     * @var \Symfony\Component\HttpFoundation\Response $response
38
     */
39
    protected $response;
40
41
    /**
42
     *
43
     * @access public
44
     * @param \Symfony\Component\HttpFoundation\Request  $request
45
     * @param \Symfony\Component\HttpFoundation\Response $response
46
     * @param \CCDNForum\ForumBundle\Entity\Post         $post
0 ignored issues
show
Documentation introduced by
Should the type for parameter $post not be null|Post?

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...
47
     */
48
    public function __construct(Request $request, Response $response, Post $post = null)
0 ignored issues
show
Bug introduced by
You have injected the Request via parameter $request. This is generally not recommended as there might be multiple instances during a request cycle (f.e. when using sub-requests). Instead, it is recommended to inject the RequestStack and retrieve the current request each time you need it via getCurrentRequest().
Loading history...
49
    {
50
        $this->request = $request;
51
        $this->response = $response;
52
        $this->post = $post;
53
    }
54
55
    /**
56
     *
57
     * @access public
58
     * @return \Symfony\Component\HttpFoundation\Response
59
     */
60
    public function getResponse()
61
    {
62
        return $this->response;
63
    }
64
}
65