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.

Kunstmaan/AdminListBundle/AdminList/AdminList.php (1 issue)

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;
4
5
use Kunstmaan\AdminListBundle\AdminList\Configurator\AdminListConfiguratorInterface;
6
use Pagerfanta\Pagerfanta;
7
use Symfony\Component\HttpFoundation\Request;
8
9
/**
10
 * AdminList
11
 */
12
class AdminList
13
{
14
    /**
15
     * @var Request
16
     */
17
    protected $request;
18
19
    /**
20
     * @var AdminListConfiguratorInterface
21
     */
22
    protected $configurator;
23
24
    /**
25
     * @param AdminListConfiguratorInterface $configurator The configurator
26
     */
27 33
    public function __construct(AdminListConfiguratorInterface $configurator)
28
    {
29 33
        $this->configurator = $configurator;
30 33
        $this->configurator->buildFilters();
31 33
        $this->configurator->buildFields();
32 33
        $this->configurator->buildItemActions();
33 33
        $this->configurator->buildListActions();
34 33
    }
35
36
    /**
37
     * @return AdminListConfiguratorInterface|null
38
     */
39 1
    public function getConfigurator()
40
    {
41 1
        return $this->configurator;
42
    }
43
44
    /**
45
     * @return FilterBuilder
46
     */
47 1
    public function getFilterBuilder()
48
    {
49 1
        return $this->configurator->getFilterBuilder();
50
    }
51
52
    /**
53
     * @param Request $request
54
     */
55 1
    public function bindRequest(Request $request)
56
    {
57 1
        $this->configurator->bindRequest($request);
58 1
    }
59
60
    /**
61
     * @return Field[]
62
     */
63 1
    public function getColumns()
64
    {
65 1
        return $this->configurator->getFields();
66
    }
67
68
    /**
69
     * @return Field[]
70
     */
71 1
    public function getExportColumns()
72
    {
73 1
        return $this->configurator->getExportFields();
74
    }
75
76
    /**
77
     * @return int
78
     */
79 1
    public function getCount()
80
    {
81 1
        return $this->configurator->getCount();
82
    }
83
84
    /**
85
     * @return array|null
86
     */
87 1
    public function getItems()
88
    {
89 1
        return $this->configurator->getItems();
90
    }
91
92
    /**
93
     * Return an iterator for all items that matches the current filtering
94
     *
95
     * @return \Iterator
96
     */
97
    public function getIterator()
98
    {
99
        return $this->configurator->getIterator();
100
    }
101
102
    /**
103
     * @param string $columnName
104
     *
105
     * @return bool
106
     */
107 2
    public function hasSort($columnName = null)
108
    {
109 2
        if (\is_null($columnName)) {
110 2
            return \count($this->configurator->getSortFields()) > 0;
111
        }
112
113 1
        return \in_array($columnName, $this->configurator->getSortFields());
114
    }
115
116
    /**
117
     * @param mixed $item
118
     *
119
     * @return bool
120
     */
121 1
    public function canEdit($item)
122
    {
123 1
        return $this->configurator->canEdit($item);
124
    }
125
126
    /**
127
     * @return bool
128
     */
129 1
    public function canAdd()
130
    {
131 1
        return $this->configurator->canAdd();
132
    }
133
134 1
    public function canView($item)
135
    {
136 1
        return $this->configurator->canView($item);
137
    }
138
139
    /**
140
     * @return array
141
     */
142 1
    public function getIndexUrl()
143
    {
144 1
        return $this->configurator->getIndexUrl();
145
    }
146
147
    /**
148
     * @param mixed $item
149
     *
150
     * @return array
151
     */
152 1
    public function getEditUrlFor($item)
153
    {
154 1
        return $this->configurator->getEditUrlFor($item);
155
    }
156
157 1
    public function getViewUrlFor($item)
158
    {
159 1
        return $this->configurator->getViewUrlFor($item);
160
    }
161
162
    /**
163
     * @param mixed $item
164
     *
165
     * @return array
166
     */
167 1
    public function getDeleteUrlFor($item)
168
    {
169 1
        return $this->configurator->getDeleteUrlFor($item);
170
    }
171
172
    /**
173
     * @param array $params
174
     *
175
     * @return array
176
     */
177 1
    public function getAddUrlFor(array $params)
178
    {
179 1
        return $this->configurator->getAddUrlFor($params);
180
    }
181
182
    /**
183
     * @param mixed $item
184
     *
185
     * @return bool
186
     */
187 1
    public function canDelete($item)
188
    {
189 1
        return $this->configurator->canDelete($item);
190
    }
191
192
    /**
193
     * @return bool
194
     */
195 1
    public function canExport()
196
    {
197 1
        return $this->configurator->canExport();
198
    }
199
200
    /**
201
     * @return array
202
     */
203 1
    public function getExportUrl()
204
    {
205 1
        return $this->configurator->getExportUrl();
206
    }
207
208
    /**
209
     * @param object|array $object    The object
210
     * @param string       $attribute The attribute
211
     *
212
     * @return mixed
213
     */
214 1
    public function getValue($object, $attribute)
215
    {
216 1
        return $this->configurator->getValue($object, $attribute);
217
    }
218
219
    /**
220
     * @param object|array $object    The object
221
     * @param string       $attribute The attribute
222
     *
223
     * @return string
224
     */
225 1
    public function getStringValue($object, $attribute)
226
    {
227 1
        return $this->configurator->getStringValue($object, $attribute);
228
    }
229
230
    /**
231
     * @return string
232
     */
233 1
    public function getOrderBy()
234
    {
235 1
        return $this->configurator->getOrderBy();
236
    }
237
238
    /**
239
     * @return string
240
     */
241 1
    public function getOrderDirection()
242
    {
243 1
        return $this->configurator->getOrderDirection();
244
    }
245
246
    /**
247
     * @return array
248
     */
249 1
    public function getItemActions()
250
    {
251 1
        return $this->configurator->getItemActions();
252
    }
253
254
    /**
255
     * @return bool
256
     */
257 1
    public function hasItemActions()
258
    {
259 1
        return $this->configurator->hasItemActions();
260
    }
261
262
    /**
263
     * @return bool
264
     */
265 1
    public function hasListActions()
266
    {
267 1
        return $this->configurator->hasListActions();
268
    }
269
270
    /**
271
     * @return array
272
     */
273 1
    public function getListActions()
274
    {
275 1
        return $this->configurator->getListActions();
276
    }
277
278
    /**
279
     * @return array
0 ignored issues
show
Consider making the return type a bit more specific; maybe use BulkAction\BulkActionInterface[].

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...
280
     */
281 1
    public function getBulkActions()
282
    {
283 1
        return $this->configurator->getBulkActions();
284
    }
285
286
    /**
287
     * @return bool
288
     */
289 1
    public function hasBulkActions()
290
    {
291 1
        return $this->configurator->hasBulkActions();
292
    }
293
294
    /**
295
     * @return Pagerfanta
296
     */
297 1
    public function getPagerfanta()
298
    {
299 1
        return $this->configurator->getPagerfanta();
300
    }
301
}
302