Issues (68)

Security Analysis    no request data  

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.

src/Html/Options/HasFeatures.php (1 issue)

Labels
Severity

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 Yajra\DataTables\Html\Options;
4
5
/**
6
 * DataTables - Features option builder.
7
 *
8
 * @see https://datatables.net/reference/option/
9
 */
10
trait HasFeatures
11
{
12
    /**
13
     * Set autoWidth option value.
14
     *
15
     * @param bool $value
16
     * @return $this
17
     * @see https://datatables.net/reference/option/autoWidth
18
     */
19
    public function autoWidth(bool $value = true)
20
    {
21
        $this->attributes['autoWidth'] = $value;
0 ignored issues
show
The property attributes does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
22
23
        return $this;
24
    }
25
26
    /**
27
     * Set deferRender option value.
28
     *
29
     * @param bool $value
30
     * @return $this
31
     * @see https://datatables.net/reference/option/deferRender
32
     */
33
    public function deferRender(bool $value = true)
34
    {
35
        $this->attributes['deferRender'] = $value;
36
37
        return $this;
38
    }
39
40
    /**
41
     * Set info option value.
42
     *
43
     * @param bool $value
44
     * @return $this
45
     * @see https://datatables.net/reference/option/info
46
     */
47
    public function info(bool $value = true)
48
    {
49
        $this->attributes['info'] = $value;
50
51
        return $this;
52
    }
53
54
    /**
55
     * Set lengthChange option value.
56
     *
57
     * @param bool $value
58
     * @return $this
59
     * @see https://datatables.net/reference/option/lengthChange
60
     */
61
    public function lengthChange(bool $value = true)
62
    {
63
        $this->attributes['lengthChange'] = $value;
64
65
        return $this;
66
    }
67
68
    /**
69
     * Set ordering option value.
70
     *
71
     * @param bool $value
72
     * @return $this
73
     * @see https://datatables.net/reference/option/ordering
74
     */
75
    public function ordering(bool $value = true)
76
    {
77
        $this->attributes['ordering'] = $value;
78
79
        return $this;
80
    }
81
82
    /**
83
     * Set processing option value.
84
     *
85
     * @param bool $value
86
     * @return $this
87
     * @see https://datatables.net/reference/option/processing
88
     */
89
    public function processing(bool $value = true)
90
    {
91
        $this->attributes['processing'] = $value;
92
93
        return $this;
94
    }
95
96
    /**
97
     * Set scrollX option value.
98
     *
99
     * @param bool $value
100
     * @return $this
101
     * @see https://datatables.net/reference/option/scrollX
102
     */
103
    public function scrollX(bool $value = true)
104
    {
105
        $this->attributes['scrollX'] = $value;
106
107
        return $this;
108
    }
109
110
    /**
111
     * Set scrollY option value.
112
     *
113
     * @param bool|mixed $value
114
     * @return $this
115
     * @see https://datatables.net/reference/option/scrollY
116
     */
117
    public function scrollY($value = true)
118
    {
119
        $this->attributes['scrollY'] = $value;
120
121
        return $this;
122
    }
123
124
    /**
125
     * Set paging option value.
126
     *
127
     * @param bool $value
128
     * @return $this
129
     * @see https://datatables.net/reference/option/paging
130
     */
131
    public function paging(bool $value = true)
132
    {
133
        $this->attributes['paging'] = $value;
134
135
        return $this;
136
    }
137
138
    /**
139
     * Set searching option value.
140
     *
141
     * @param bool $value
142
     * @return $this
143
     * @see https://datatables.net/reference/option/searching
144
     */
145
    public function searching(bool $value = true)
146
    {
147
        $this->attributes['searching'] = $value;
148
149
        return $this;
150
    }
151
152
    /**
153
     * Set serverSide option value.
154
     *
155
     * @param bool $value
156
     * @return $this
157
     * @see https://datatables.net/reference/option/serverSide
158
     */
159
    public function serverSide(bool $value = true)
160
    {
161
        $this->attributes['serverSide'] = $value;
162
163
        return $this;
164
    }
165
166
    /**
167
     * Set stateSave option value.
168
     *
169
     * @param bool $value
170
     * @return $this
171
     * @see https://datatables.net/reference/option/stateSave
172
     */
173
    public function stateSave(bool $value = true)
174
    {
175
        $this->attributes['stateSave'] = $value;
176
177
        return $this;
178
    }
179
}
180