renderActionButtonDuplicate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
/*
4
 * This file is part of the jquery-datatables-bundle package.
5
 *
6
 * (c) 2019 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\JQuery\DataTablesBundle\Tests\Fixtures\Provider;
13
14
use DateTime;
15
use WBW\Bundle\JQuery\DataTablesBundle\Api\DataTablesColumnInterface;
16
use WBW\Bundle\JQuery\DataTablesBundle\Provider\AbstractDataTablesProvider;
17
18
/**
19
 * Test DataTables provider.
20
 *
21
 * @author webeweb <https://github.com/webeweb>
22
 * @package WBW\Bundle\JQuery\DataTablesBundle\Tests\Fixtures\Provider
23
 */
24
class TestDataTablesProvider extends AbstractDataTablesProvider {
25
26
    /**
27
     *{@inheritDoc}
28
     */
29
    public function getColumns(): array {
30
        return [];
31
    }
32
33
    /**
34
     *{@inheritDoc}
35
     */
36
    public function getEntity() {
37
        return null;
38
    }
39
40
    /**
41
     * {@inheritDoc}
42
     */
43
    public function getName(): string {
44
        return "test";
45
    }
46
47
    /**
48
     *{@inheritDoc}
49
     */
50
    public function getPrefix(): string {
51
        return "t";
52
    }
53
54
    /**
55
     *{@inheritDoc}
56
     */
57
    public function getView(): ?string {
58
        return null;
59
    }
60
61
    /**
62
     *{@inheritDoc}
63
     */
64
    public function renderActionButtonComment($entity, string $route, ?string $comment): string {
65
        return parent::renderActionButtonComment($entity, $route, $comment);
66
    }
67
68
    /**
69
     *{@inheritDoc}
70
     */
71
    public function renderActionButtonDelete($entity, string $route): string {
72
        return parent::renderActionButtonDelete($entity, $route);
73
    }
74
75
    /**
76
     *{@inheritDoc}
77
     */
78
    public function renderActionButtonDuplicate($entity, string $route): string {
79
        return parent::renderActionButtonDuplicate($entity, $route);
80
    }
81
82
    /**
83
     *{@inheritDoc}
84
     */
85
    public function renderActionButtonEdit($entity, string $route): string {
86
        return parent::renderActionButtonEdit($entity, $route);
87
    }
88
89
    /**
90
     *{@inheritDoc}
91
     */
92
    public function renderActionButtonNew($entity, string $route): string {
93
        return parent::renderActionButtonNew($entity, $route);
94
    }
95
96
    /**
97
     *{@inheritDoc}
98
     */
99
    public function renderActionButtonPdf($entity, string $route): string {
100
        return parent::renderActionButtonPdf($entity, $route);
101
    }
102
103
    /**
104
     *{@inheritDoc}
105
     */
106
    public function renderActionButtonShow($entity, string $route): string {
107
        return parent::renderActionButtonShow($entity, $route);
108
    }
109
110
    /**
111
     *{@inheritDoc}
112
     */
113
    public function renderActionButtonSwitch($entity, string $route, ?bool $enabled): string {
114
        return parent::renderActionButtonSwitch($entity, $route, $enabled);
115
    }
116
117
    /**
118
     *{@inheritDoc}
119
     */
120
    public function renderButtons($entity, string $editRoute, string $deleteRoute = null, bool $enableDelete = true): string {
121
        return parent::renderButtons($entity, $editRoute, $deleteRoute, $enableDelete);
0 ignored issues
show
Deprecated Code introduced by
The function WBW\Bundle\JQuery\DataTa...ovider::renderButtons() has been deprecated: since 3.4.0 use {@see WBW\Bundle\JQuery\DataTablesBundle\Provider\AbstractDataTablesProvider::renderRowButtons()} instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

121
        return /** @scrutinizer ignore-deprecated */ parent::renderButtons($entity, $editRoute, $deleteRoute, $enableDelete);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
122
    }
123
124
    /**
125
     *{@inheritDoc}
126
     */
127
    public function renderColumn(DataTablesColumnInterface $dtColumn, $entity): ?string {
128
        return null;
129
    }
130
131
    /**
132
     *{@inheritDoc}
133
     */
134
    public function renderDate(?DateTime $date, string $format = "d/m/Y"): ?string {
135
        return parent::renderDate($date, $format);
136
    }
137
138
    /**
139
     *{@inheritDoc}
140
     */
141
    public function renderDateTime(?DateTime $date, string $format = "d/m/Y H:i"): ?string {
142
        return parent::renderDateTime($date, $format);
143
    }
144
145
    /**
146
     *{@inheritDoc}
147
     */
148
    public function renderFloat(?float $number, int $decimals = 2, string $decPoint = ".", string $thousandsSep = ","): ?string {
149
        return parent::renderFloat($number, $decimals, $decPoint, $thousandsSep);
150
    }
151
152
    /**
153
     *{@inheritDoc}
154
     */
155
    public function renderPercent(?float $number): ?string {
156
        return parent::renderPercent($number);
157
    }
158
159
    /**
160
     *{@inheritDoc}
161
     */
162
    public function renderPrice(?float $number, string $currency = "€"): ?string {
163
        return parent::renderPrice($number, $currency);
164
    }
165
166
    /**
167
     *{@inheritDoc}
168
     */
169
    public function renderRow(string $dtRow, $entity, int $rowNumber) {
170
        return parent::renderRow($dtRow, $entity, $rowNumber);
171
    }
172
173
    /**
174
     *{@inheritDoc}
175
     */
176
    public function renderRowButtons($entity, string $editRoute = null, string $deleteRoute = null, string $showRoute = null): string {
177
        return parent::renderRowButtons($entity, $editRoute, $deleteRoute, $showRoute);
178
    }
179
180
    /**
181
     *{@inheritDoc}
182
     */
183
    public function wrapContent(?string $prefix, string $content, ?string $suffix): string {
184
        return parent::wrapContent($prefix, $content, $suffix);
185
    }
186
}
187