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\Tests\Entity; |
||
4 | |||
5 | use Kunstmaan\AdminBundle\Entity\AbstractEntity; |
||
6 | use Kunstmaan\NodeBundle\Entity\AbstractPage; |
||
7 | use Kunstmaan\NodeBundle\Entity\HasNodeInterface; |
||
8 | use Symfony\Component\Form\AbstractType; |
||
9 | |||
10 | /** |
||
11 | * TestEntity |
||
12 | */ |
||
13 | class TestEntity extends AbstractEntity implements HasNodeInterface |
||
14 | { |
||
15 | /** |
||
16 | * @param int $id |
||
17 | */ |
||
18 | public function __construct($id = 0) |
||
19 | { |
||
20 | $this->setId($id); |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * @return string |
||
0 ignored issues
–
show
|
|||
25 | */ |
||
26 | public function getTitle() |
||
27 | { |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Set title |
||
32 | * |
||
33 | * @param string $title |
||
34 | * |
||
35 | * @return AbstractPage |
||
0 ignored issues
–
show
|
|||
36 | */ |
||
37 | public function setTitle($title) |
||
38 | { |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @return string |
||
0 ignored issues
–
show
|
|||
43 | */ |
||
44 | public function getPageTitle() |
||
45 | { |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @return bool |
||
0 ignored issues
–
show
|
|||
50 | */ |
||
51 | public function isOnline() |
||
52 | { |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @return HasNodeInterface |
||
0 ignored issues
–
show
|
|||
57 | */ |
||
58 | public function getParent() |
||
59 | { |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @param HasNodeInterface $hasNode |
||
64 | */ |
||
65 | public function setParent(HasNodeInterface $hasNode) |
||
66 | { |
||
67 | } |
||
68 | |||
69 | /** |
||
70 | * {@inheritdoc} |
||
71 | */ |
||
72 | public function getDefaultAdminType() |
||
73 | { |
||
74 | } |
||
75 | |||
76 | /** |
||
77 | * @return array |
||
0 ignored issues
–
show
Should the return type not be
array|null ? Also, consider making the array more specific, something like array<String> , or String[] .
This check compares the return type specified in the If the return type contains the type array, this check recommends the use of
a more specific type like
Loading history...
|
|||
78 | */ |
||
79 | public function getPossibleChildTypes() |
||
80 | { |
||
81 | } |
||
82 | |||
83 | /** |
||
84 | * @return boolean |
||
85 | */ |
||
86 | public function isStructureNode() |
||
87 | { |
||
88 | return false; |
||
89 | } |
||
90 | } |
||
91 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.