Completed
Push — master ( 1af7e7...796d56 )
by Jeroen
16s
created

Tests/unit/Model/ConcreteConfigurator.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
namespace Kunstmaan\AdminListBundle\Tests\unit\Model;
3
4
use ArrayIterator;
5
use Kunstmaan\AdminListBundle\AdminList\Configurator\AbstractAdminListConfigurator;
6
use Pagerfanta\Pagerfanta;
7
8
class ConcreteConfigurator extends AbstractAdminListConfigurator
9
{
10
    /**
11
     * @return string
12
     */
13
    public function getBundleName()
14
    {
15
        return 'xyz';
16
    }
17
18
    /**
19
     * @return string
20
     */
21
    public function getEntityName()
22
    {
23
        return 'Xyz';
24
    }
25
26
    /**
27
     * @return mixed
28
     */
29
    public function buildFields()
30
    {
31
        return true;
32
    }
33
34
    /**
35
     * @param array|object $item
36
     * @return array
0 ignored issues
show
Consider making the return type a bit more specific; maybe use array<string,array<string,string|array>>.

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.

Loading history...
37
     */
38
    public function getEditUrlFor($item)
39
    {
40
        return [
41
            'Xyz' =>  [
42
                'path' => 'xyz_admin_xyz_edit',
43
                'params' => [],
44
            ]
45
        ];
46
    }
47
48
    /**
49
     * @param array|object $item
50
     * @return array
0 ignored issues
show
Consider making the return type a bit more specific; maybe use array<string,array<string,string|array>>.

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.

Loading history...
51
     */
52
    public function getDeleteUrlFor($item)
53
    {
54
        return [
55
            'Xyz' =>  [
56
                'path' => 'xyz_admin_xyz_delete',
57
                'params' => [],
58
            ]
59
        ];
60
    }
61
62
    /**
63
     * @return int
64
     */
65
    public function getCount()
66
    {
67
        // TODO: Implement getCount() method.
68
    }
69
70
    /**
71
     * @return mixed
72
     */
73
    public function getItems()
74
    {
75
        return [
76
            'some' => 'item',
77
        ];
78
    }
79
80
    /**
81
     * @return Pagerfanta
82
     */
83
    public function getPagerfanta()
84
    {
85
        return 'fake pagerfanta';
86
    }
87
88
    /**
89
     * @return mixed
90
     */
91
    public function getIterator()
92
    {
93
        return new ArrayIterator();
94
    }
95
}
96