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\AdminListBundle\Tests\unit\Model; |
||
4 | |||
5 | use ArrayIterator; |
||
6 | use Kunstmaan\AdminListBundle\AdminList\Configurator\AbstractAdminListConfigurator; |
||
7 | use Pagerfanta\Pagerfanta; |
||
8 | |||
9 | class ConcreteConfigurator extends AbstractAdminListConfigurator |
||
10 | { |
||
11 | /** |
||
12 | * @return string |
||
13 | */ |
||
14 | public function getBundleName() |
||
15 | { |
||
16 | return 'xyz'; |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * @return string |
||
21 | */ |
||
22 | public function getEntityName() |
||
23 | { |
||
24 | return 'Xyz'; |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @return mixed |
||
29 | */ |
||
30 | public function buildFields() |
||
31 | { |
||
32 | return true; |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @param array|object $item |
||
37 | * |
||
38 | * @return array |
||
0 ignored issues
–
show
|
|||
39 | */ |
||
40 | public function getEditUrlFor($item) |
||
41 | { |
||
42 | return [ |
||
43 | 'Xyz' => [ |
||
44 | 'path' => 'xyz_admin_xyz_edit', |
||
45 | 'params' => [], |
||
46 | ], |
||
47 | ]; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @param array|object $item |
||
52 | * |
||
53 | * @return array |
||
0 ignored issues
–
show
|
|||
54 | */ |
||
55 | public function getDeleteUrlFor($item) |
||
56 | { |
||
57 | return [ |
||
58 | 'Xyz' => [ |
||
59 | 'path' => 'xyz_admin_xyz_delete', |
||
60 | 'params' => [], |
||
61 | ], |
||
62 | ]; |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * @return int |
||
67 | */ |
||
68 | public function getCount() |
||
69 | { |
||
70 | // TODO: Implement getCount() method. |
||
71 | } |
||
72 | |||
73 | /** |
||
74 | * @return mixed |
||
75 | */ |
||
76 | public function getItems() |
||
77 | { |
||
78 | return [ |
||
79 | 'some' => 'item', |
||
80 | ]; |
||
81 | } |
||
82 | |||
83 | /** |
||
84 | * @return Pagerfanta |
||
85 | */ |
||
86 | public function getPagerfanta() |
||
87 | { |
||
88 | return 'fake pagerfanta'; |
||
89 | } |
||
90 | |||
91 | /** |
||
92 | * @return mixed |
||
93 | */ |
||
94 | public function getIterator() |
||
95 | { |
||
96 | return new ArrayIterator(); |
||
97 | } |
||
98 | } |
||
99 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.