Completed
Push — master ( d7f3a5...d6e5bd )
by
unknown
95:27 queued 72:17
created

ConcreteConfigurator::getCount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
nc 1
cc 1
nop 0
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
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use boolean.

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...
28
     */
29
    public function buildFields()
30
    {
31
        return true;
32
    }
33
34
    /**
35
     * @param array|object $item
36
     * @return array
0 ignored issues
show
Documentation introduced by
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
Documentation introduced by
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
0 ignored issues
show
Documentation introduced by
Should the return type not be integer|null?

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.

Loading history...
64
     */
65
    public function getCount()
66
    {
67
        // TODO: Implement getCount() method.
68
    }
69
70
    /**
71
     * @return mixed
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use array<string,string>.

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...
72
     */
73
    public function getItems()
74
    {
75
        return [
76
            'some' => 'item',
77
        ];
78
    }
79
80
    /**
81
     * @return Pagerfanta
0 ignored issues
show
Documentation introduced by
Should the return type not be string?

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.

Loading history...
82
     */
83
    public function getPagerfanta()
84
    {
85
        return 'fake pagerfanta';
86
    }
87
88
    /**
89
     * @return mixed
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use ArrayIterator.

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...
90
     */
91
    public function getIterator()
92
    {
93
        return new ArrayIterator();
94
    }
95
}
96