Issues (3099)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

Configurator/AdminListConfiguratorInterface.php (3 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
3
namespace Kunstmaan\AdminListBundle\AdminList\Configurator;
4
5
use InvalidArgumentException;
6
use Kunstmaan\AdminListBundle\AdminList\BulkAction\BulkActionInterface;
7
use Kunstmaan\AdminListBundle\AdminList\Field;
8
use Kunstmaan\AdminListBundle\AdminList\FilterBuilder;
9
use Kunstmaan\AdminListBundle\AdminList\ItemAction\ItemActionInterface;
10
use Kunstmaan\AdminListBundle\AdminList\ListAction\ListActionInterface;
11
use Pagerfanta\Pagerfanta;
12
use Symfony\Component\HttpFoundation\Request;
13
14
/**
15
 * Implement this interface to create your own admin list
16
 */
17
interface AdminListConfiguratorInterface
18
{
19
    /**
20
     * Configure the visible columns
21
     */
22
    public function buildFields();
23
24
    /**
25
     * Configure the fields you can filter on
26
     */
27
    public function buildFilters();
0 ignored issues
show
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
28
29
    /**
30
     * Configure the actions for each item
31
     */
32
    public function buildItemActions();
0 ignored issues
show
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
33
34
    /**
35
     * Configure the actions that can be executed on the whole list
36
     */
37
    public function buildListActions();
0 ignored issues
show
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
38
39
    /**
40
     * Return the url to edit the given $item
41
     *
42
     * @param object|array $item
43
     *
44
     * @return array
45
     */
46
    public function getEditUrlFor($item);
47
48
    /**
49
     * Configure the types of items you can add
50
     *
51
     * @param array $params
52
     *
53
     * @return array
54
     */
55
    public function getAddUrlFor(array $params = array());
56
57
    /**
58
     * Get the delete url for the given $item
59
     *
60
     * @param object|array $item
61
     *
62
     * @return array
63
     */
64
    public function getDeleteUrlFor($item);
65
66
    /**
67
     * Return the url to list all the items
68
     *
69
     * @return array
70
     */
71
    public function getIndexUrl();
72
73
    /**
74
     * Get the url to export the listed items
75
     *
76
     * @return array
77
     */
78
    public function getExportUrl();
79
80
    /**
81
     * Get the view url for the given $item
82
     *
83
     * @param object|array $item
84
     *
85
     * @return array
86
     */
87
    public function getViewUrlFor($item);
88
89
    /**
90
     * @param object $entity
91
     *
92
     * @throws InvalidArgumentException
93
     *
94
     * @return string FQCN of form type
95
     */
96
    public function getAdminType($entity);
97
98
    /**
99
     * @param object|array $item
100
     *
101
     * @return bool
102
     */
103
    public function canEdit($item);
104
105
    public function canView($item);
106
107
    /**
108
     * Configure if it's possible to delete the given $item
109
     *
110
     * @param object|array $item
111
     *
112
     * @return bool
113
     */
114
    public function canDelete($item);
115
116
    /**
117
     * Configure if it's possible to add new items
118
     *
119
     * @return bool
120
     */
121
    public function canAdd();
122
123
    /**
124
     * Configure if it's possible to add new items
125
     *
126
     * @return bool
127
     */
128
    public function canExport();
129
130
    /**
131
     * @return array
132
     */
133
    public function getSortFields();
134
135
    /**
136
     * @return Field[]
137
     */
138
    public function getFields();
139
140
    /**
141
     * @return Field[]
142
     */
143
    public function getExportFields();
144
145
    /**
146
     * @return bool
147
     */
148
    public function hasItemActions();
149
150
    /**
151
     * @return ItemActionInterface[]
152
     */
153
    public function getItemActions();
154
155
    /**
156
     * @return bool
157
     */
158
    public function hasListActions();
159
160
    /**
161
     * @return ListActionInterface[]
162
     */
163
    public function getListActions();
164
165
    /**
166
     * @return bool
167
     */
168
    public function hasBulkActions();
169
170
    /**
171
     * @return BulkActionInterface[]
172
     */
173
    public function getBulkActions();
174
175
    /**
176
     * @param array|object $item       The item
177
     * @param string       $columnName The column name
178
     *
179
     * @return mixed
180
     */
181
    public function getValue($item, $columnName);
182
183
    /**
184
     * @param array|object $item       The item
185
     * @param string       $columnName The column name
186
     *
187
     * @return string
188
     */
189
    public function getStringValue($item, $columnName);
190
191
    /**
192
     * @return string
193
     */
194
    public function getListTemplate();
195
196
    /**
197
     * @return string
198
     */
199
    public function getAddTemplate();
200
201
    /**
202
     * @return string
203
     */
204
    public function getEditTemplate();
205
206
    /**
207
     * @return string
208
     */
209
    public function getDeleteTemplate();
210
211
    /**
212
     * You can override this method to do some custom things you need to do when adding an entity
213
     *
214
     * @param object $entity
215
     *
216
     * @return mixed
217
     */
218
    public function decorateNewEntity($entity);
219
220
    /**
221
     * Return total number of items.
222
     *
223
     * @return int
224
     */
225
    public function getCount();
226
227
    /**
228
     * Return items on current page.
229
     *
230
     * @return mixed
231
     */
232
    public function getItems();
233
234
    /**
235
     * Bind request
236
     *
237
     * @param Request $request
238
     */
239
    public function bindRequest(Request $request);
240
241
    /**
242
     * Get current pagerfanta
243
     *
244
     * @return Pagerfanta
245
     */
246
    public function getPagerfanta();
247
248
    /**
249
     * @return FilterBuilder
250
     */
251
    public function getFilterBuilder();
252
253
    /**
254
     * Return current sorting column.
255
     *
256
     * @return string
257
     */
258
    public function getOrderBy();
259
260
    /**
261
     * Return current sorting direction.
262
     *
263
     * @return string
264
     */
265
    public function getOrderDirection();
266
267
    /**
268
     * Return extra parameters for use in list actions.
269
     *
270
     * @return array
271
     */
272
    public function getExtraParameters();
273
}
274