Issues (19)

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/Loop/Loop.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 Dazzle\Loop;
4
5
use Dazzle\Loop\Flow\FlowController;
6
use Dazzle\Loop\Model\SelectLoop;
7
use Dazzle\Loop\Timer\TimerInterface;
8
9
class Loop implements LoopExtendedInterface
10
{
11
    /**
12
     * @var LoopModelInterface
13
     */
14
    protected $loop;
15
16
    /**
17
     * @param LoopModelInterface
18
     */
19 65
    public function __construct(LoopModelInterface $loop = null)
20
    {
21 65
        $this->loop = $loop === null ? new SelectLoop() : $loop;
22 65
    }
23
24
    /**
25
     *
26
     */
27 37
    public function __destruct()
28
    {
29
//        unset($this->loop);
0 ignored issues
show
Unused Code Comprehensibility introduced by
75% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
30 37
    }
31
32
    /**
33
     * @override
34
     * @inheritDoc
35
     */
36 10
    public function getModel()
37
    {
38 10
        return $this->loop;
39
    }
40
41
    /**
42
     * @override
43
     * @inheritDoc
44
     */
45 5
    public function erase($all = false)
46
    {
47 5
        $this->loop->erase($all);
48
49 5
        return $this;
50
    }
51
52
    /**
53
     * @override
54
     * @inheritDoc
55
     */
56 3
    public function export(LoopExtendedInterface $loop, $all = false)
57
    {
58 3
        $this->loop->export($loop->getModel(), $all);
59
60 3
        return $this;
61
    }
62
63
    /**
64
     * @override
65
     * @inheritDoc
66
     */
67 3
    public function import(LoopExtendedInterface $loop, $all = false)
68
    {
69 3
        $this->loop->import($loop->getModel(), $all);
70
71 3
        return $this;
72
    }
73
74
    /**
75
     * @override
76
     * @inheritDoc
77
     */
78 3
    public function swap(LoopExtendedInterface $loop, $all = false)
79
    {
80 3
        $this->loop->swap($loop->getModel(), $all);
81
82 3
        return $this;
83
    }
84
85
    /**
86
     * @override
87
     * @inheritDoc
88
     */
89 2
    public function isRunning()
90
    {
91 2
        return $this->loop->isRunning();
92
    }
93
94
    /**
95
     * @override
96
     * @inheritDoc
97
     */
98 8
    public function addReadStream($stream, callable $listener)
99
    {
100 8
        $this->loop->addReadStream($stream, $listener);
101 8
    }
102
103
    /**
104
     * @override
105
     * @inheritDoc
106
     */
107 8
    public function addWriteStream($stream, callable $listener)
108
    {
109 8
        $this->loop->addWriteStream($stream, $listener);
110 8
    }
111
112
    /**
113
     * @override
114
     * @inheritDoc
115
     */
116 3
    public function removeReadStream($stream)
117
    {
118 3
        $this->loop->removeReadStream($stream);
119 3
    }
120
121
    /**
122
     * @override
123
     * @inheritDoc
124
     */
125 5
    public function removeWriteStream($stream)
126
    {
127 5
        $this->loop->removeWriteStream($stream);
128 5
    }
129
130
    /**
131
     * @override
132
     * @inheritDoc
133
     */
134 4
    public function removeStream($stream)
135
    {
136 4
        $this->loop->removeStream($stream);
137 4
    }
138
139
    /**
140
     * @override
141
     * @inheritDoc
142
     */
143 5
    public function addTimer($interval, callable $callback)
144
    {
145 5
        return $this->loop->addTimer($interval, $callback);
146
    }
147
148
    /**
149
     * @override
150
     * @inheritDoc
151
     */
152 2
    public function addPeriodicTimer($interval, callable $callback)
153
    {
154 2
        return $this->loop->addPeriodicTimer($interval, $callback);
155
    }
156
157
    /**
158
     * @override
159
     * @inheritDoc
160
     */
161 3
    public function cancelTimer(TimerInterface $timer)
162
    {
163 3
        $this->loop->cancelTimer($timer);
164 3
    }
165
166
    /**
167
     * @override
168
     * @inheritDoc
169
     */
170 3
    public function isTimerActive(TimerInterface $timer)
171
    {
172 3
        return $this->loop->isTimerActive($timer);
173
    }
174
175
    /**
176
     * @override
177
     * @inheritDoc
178
     */
179 2
    public function onStart(callable $listener)
180
    {
181 2
        $this->loop->onStart($listener);
182 2
    }
183
184
    /**
185
     * @override
186
     * @inheritDoc
187
     */
188 2
    public function onStop(callable $listener)
189
    {
190 2
        $this->loop->onStop($listener);
191 2
    }
192
193
    /**
194
     * @override
195
     * @inheritDoc
196
     */
197 1
    public function onTick(callable $listener)
198
    {
199 1
        $this->loop->onAfterTick($listener);
200 1
    }
201
202
    /**
203
     * @override
204
     * @inheritDoc
205
     */
206 5
    public function onBeforeTick(callable $listener)
207
    {
208 5
        $this->loop->onBeforeTick($listener);
209 5
    }
210
211
    /**
212
     * @override
213
     * @inheritDoc
214
     */
215 8
    public function onAfterTick(callable $listener)
216
    {
217 8
        $this->loop->onAfterTick($listener);
218 8
    }
219
220
    /**
221
     * @override
222
     * @inheritDoc
223
     */
224 15
    public function tick()
225
    {
226 15
        $this->loop->tick();
227 15
    }
228
229
    /**
230
     * @override
231
     * @inheritDoc
232
     */
233 6
    public function start()
234
    {
235 6
        $this->loop->start();
236 6
    }
237
238
    /**
239
     * @override
240
     * @inheritDoc
241
     */
242 6
    public function stop()
243
    {
244 6
        $this->loop->stop();
245 6
    }
246
247
    /**
248
     * @override
249
     * @inheritDoc
250
     */
251 2
    public function setFlowController($flowController)
252
    {
253 2
        $this->loop->setFlowController($flowController);
254 2
    }
255
256
    /**
257
     * @override
258
     * @inheritDoc
259
     */
260 3
    public function getFlowController()
261
    {
262 3
        return $this->loop->getFlowController();
263
    }
264
}
265