These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\NodeBundle\Event; |
||
4 | |||
5 | use Kunstmaan\NodeBundle\Helper\RenderContext; |
||
6 | use Symfony\Component\EventDispatcher\Event; |
||
7 | use Symfony\Component\HttpFoundation\Response; |
||
8 | |||
9 | /** |
||
10 | * Class SlugEvent |
||
11 | */ |
||
12 | class SlugEvent extends Event |
||
13 | { |
||
14 | /** |
||
15 | * @var Response |
||
16 | */ |
||
17 | protected $response; |
||
18 | |||
19 | /** |
||
20 | * @var RenderContext |
||
21 | */ |
||
22 | protected $renderContext; |
||
23 | |||
24 | /** |
||
25 | * @param Response $response |
||
0 ignored issues
–
show
|
|||
26 | */ |
||
27 | 1 | public function __construct(Response $response = null, RenderContext $renderContext) |
|
28 | { |
||
29 | 1 | $this->response = $response; |
|
30 | 1 | $this->renderContext = $renderContext; |
|
31 | 1 | } |
|
32 | |||
33 | /** |
||
34 | * @return Response |
||
35 | */ |
||
36 | 1 | public function getResponse() |
|
37 | { |
||
38 | 1 | return $this->response; |
|
39 | } |
||
40 | |||
41 | 1 | public function setResponse(Response $response) |
|
42 | { |
||
43 | 1 | $this->response = $response; |
|
44 | 1 | } |
|
45 | |||
46 | /** |
||
47 | * @return RenderContext |
||
48 | */ |
||
49 | 1 | public function getRenderContext() |
|
50 | { |
||
51 | 1 | return $this->renderContext; |
|
52 | } |
||
53 | |||
54 | 1 | public function setRenderContext(RenderContext $renderContext) |
|
55 | { |
||
56 | 1 | $this->renderContext = $renderContext; |
|
57 | 1 | } |
|
58 | } |
||
59 |
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.