Issues (319)

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/Row.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
 * @company MTE Telecom, Ltd.
4
 * @author Roman Malashin <[email protected]>
5
 */
6
7
namespace Nnx\DataGrid;
8
9
use ArrayAccess;
10
11
/**
12
 * Class Row
13
 * @package Nnx\DataGrid
14
 */
15
class Row implements ArrayAccess
16
{
17
    /**
18
     * Данные строки
19
     * @var array|ArrayAccess
20
     */
21
    protected $data;
22
23
    /**
24
     * Опции строки
25
     * @var array
26
     */
27
    protected $options;
28
29
    /**
30
     * @param array|ArrayAccess $data
31
     * @param array $options
32
     */
33
    public function __construct($data, array $options = [])
34
    {
35
        $this->setData($data);
36
        $this->setOptions($options);
37
    }
38
39
    /**
40
     * @return array|ArrayAccess
41
     */
42
    public function getData()
43
    {
44
        return $this->data;
45
    }
46
47
    /**
48
     * @param array|ArrayAccess $data
49
     * @return $this
50
     */
51
    public function setData($data)
52
    {
53
        $this->data = $data;
54
        return $this;
55
    }
56
57
    /**
58
     * @return array
59
     */
60
    public function getOptions()
61
    {
62
        return $this->options;
63
    }
64
65
    /**
66
     * @param array $options
67
     * @return $this
68
     */
69
    public function setOptions($options)
70
    {
71
        $this->options = $options;
72
        return $this;
73
    }
74
75
    /**
76
     * @param string $name
77
     * @return mixed
78
     * @throws Exception\InvalidArgumentException
79
     * @throws Exception\RuntimeException
80
     */
81
    public function get($name)
82
    {
83
        return $this->offsetGet($name);
84
    }
85
86
    /**
87
     * (PHP 5 &gt;= 5.0.0)<br/>
88
     * Whether a offset exists
89
     * @link http://php.net/manual/en/arrayaccess.offsetexists.php
90
     * @param mixed $offset <p>
91
     * An offset to check for.
92
     * </p>
93
     * @return boolean true on success or false on failure.
94
     * </p>
95
     * <p>
96
     * The return value will be casted to boolean if non-boolean was returned.
97
     */
98
    public function offsetExists($offset)
99
    {
100
        return array_key_exists($offset, $this->data);
101
    }
102
103
    /**
104
     * (PHP 5 &gt;= 5.0.0)<br/>
105
     * Offset to retrieve
106
     * @link http://php.net/manual/en/arrayaccess.offsetget.php
107
     * @param mixed $offset <p>
108
     * The offset to retrieve.
109
     * </p>
110
     * @return mixed Can return all value types.
111
     * @throws Exception\InvalidArgumentException
112
     * @throws Exception\RuntimeException
113
     */
114
    public function offsetGet($offset)
115
    {
116
        if (!$offset || !is_string($offset)) {
117
            throw new Exception\InvalidArgumentException('Некооректное имя столбца для получения из строки таблицы');
118
        }
119
        if (!array_key_exists($offset, $this->data)) {
120
            throw new Exception\RuntimeException(sprintf('Не найден столбец с именем %s в строке', $offset));
121
        }
122
        return $this->data[$offset];
123
    }
124
125
    /**
126
     * (PHP 5 &gt;= 5.0.0)<br/>
127
     * Offset to set
128
     * @link http://php.net/manual/en/arrayaccess.offsetset.php
129
     * @param mixed $offset <p>
130
     * The offset to assign the value to.
131
     * </p>
132
     * @param mixed $value <p>
133
     * The value to set.
134
     * </p>
135
     * @return void
136
     */
137
    public function offsetSet($offset, $value)
138
    {
139
        $this->data[$offset] = $value;
140
    }
141
142
    /**
143
     * (PHP 5 &gt;= 5.0.0)<br/>
144
     * Offset to unset
145
     * @link http://php.net/manual/en/arrayaccess.offsetunset.php
146
     * @param mixed $offset <p>
147
     * The offset to unset.
148
     * </p>
149
     * @return void
150
     */
151
    public function offsetUnset($offset)
152
    {
153
        unset($this->data[$offset]);
154
    }
155
}
0 ignored issues
show
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
156