Issues (5)

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/PluginManager/NullEventManager.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 Abacaphiliac\Zend\EventManager\PluginManager;
4
5
use Traversable;
6
use Zend\EventManager\EventManagerInterface;
7
use Zend\EventManager\ListenerAggregateInterface;
8
use Zend\EventManager\ResponseCollection;
9
use Zend\EventManager\SharedEventManagerAwareInterface;
10
use Zend\EventManager\SharedEventManagerInterface;
11
use Zend\Stdlib\CallbackHandler;
12
13
class NullEventManager implements EventManagerInterface
14
{
15
    /** @var  SharedEventManagerInterface */
16
    private $sharedEventManager;
17
18
    /**
19
     * NullEventManager constructor.
20
     * @param SharedEventManagerInterface $sharedEventManager
21
     */
22 22
    public function __construct(SharedEventManagerInterface $sharedEventManager)
23
    {
24 22
        $this->sharedEventManager = $sharedEventManager;
25 22
    }
26
27
    /**
28
     * Trigger an event
29
     *
30
     * Should allow handling the following scenarios:
31
     * - Passing Event object only
32
     * - Passing event name and Event object only
33
     * - Passing event name, target, and Event object
34
     * - Passing event name, target, and array|ArrayAccess of arguments
35
     *
36
     * Can emulate triggerUntil() if the last argument provided is a callback.
37
     *
38
     * @param  string $event
39
     * @param  object|string $target
40
     * @param  array|object $argv
41
     * @param  null|callable $callback
42
     * @return ResponseCollection
43
     */
44 1
    public function trigger($event, $target = null, $argv = array(), $callback = null)
45
    {
46 1
        return new ResponseCollection();
47
    }
48
49
    /**
50
     * Trigger an event until the given callback returns a boolean false
51
     *
52
     * Should allow handling the following scenarios:
53
     * - Passing Event object and callback only
54
     * - Passing event name, Event object, and callback only
55
     * - Passing event name, target, Event object, and callback
56
     * - Passing event name, target, array|ArrayAccess of arguments, and callback
57
     *
58
     * @param  string $event
59
     * @param  object|string $target
60
     * @param  array|object $argv
61
     * @param  callable $callback
62
     * @return ResponseCollection
63
     */
64 1
    public function triggerUntil($event, $target, $argv = null, $callback = null)
65
    {
66 1
        return new ResponseCollection();
67
    }
68
69
    /**
70
     * Attach a listener to an event
71
     *
72
     * @param  string $event
73
     * @param  callable $callback
74
     * @param  int $priority Priority at which to register listener
75
     * @return CallbackHandler
76
     */
77
    public function attach($event, $callback = null, $priority = 1)
78
    {
79 2
        return new CallbackHandler(function () {
0 ignored issues
show
Deprecated Code introduced by
The class Zend\Stdlib\CallbackHandler has been deprecated with message: as of v2.7.4.

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
80
            
81 2
        });
82
    }
83
84
    /**
85
     * Detach an event listener
86
     *
87
     * @param  CallbackHandler|ListenerAggregateInterface $listener
88
     * @return bool
89
     */
90 1
    public function detach($listener)
91
    {
92 1
        return true;
93
    }
94
95
    /**
96
     * Get a list of events for which this collection has listeners
97
     *
98
     * @return array
99
     */
100 3
    public function getEvents()
101
    {
102 3
        return array();
103
    }
104
105
    /**
106
     * Retrieve a list of listeners registered to a given event
107
     *
108
     * @param  string $event
109
     * @return array|object
110
     */
111 1
    public function getListeners($event)
112
    {
113 1
        return array();
114
    }
115
116
    /**
117
     * Clear all listeners for a given event
118
     *
119
     * @param  string $event
120
     * @return void
121
     */
122 1
    public function clearListeners($event)
123
    {
124
125 1
    }
126
127
    /**
128
     * Set the event class to utilize
129
     *
130
     * @param  string $class
131
     * @return EventManagerInterface
132
     */
133 1
    public function setEventClass($class)
134
    {
135 1
        return $this;
136
    }
137
138
    /**
139
     * Get the identifier(s) for this EventManager
140
     *
141
     * @return array
142
     */
143 3
    public function getIdentifiers()
144
    {
145 3
        return array();
146
    }
147
148
    /**
149
     * Set the identifiers (overrides any currently set identifiers)
150
     *
151
     * @param string|int|array|Traversable $identifiers
152
     * @return EventManagerInterface
153
     */
154 2
    public function setIdentifiers($identifiers)
155
    {
156 2
        return $this;
157
    }
158
159
    /**
160
     * Add some identifier(s) (appends to any currently set identifiers)
161
     *
162
     * @param string|int|array|Traversable $identifiers
163
     * @return EventManagerInterface
164
     */
165 2
    public function addIdentifiers($identifiers)
166
    {
167 2
        return $this;
168
    }
169
170
    /**
171
     * Attach a listener aggregate
172
     *
173
     * @param  ListenerAggregateInterface $aggregate
174
     * @param  int $priority If provided, a suggested priority for the aggregate to use
175
     * @return void return value of {@link ListenerAggregateInterface::attach()}
176
     */
177 2
    public function attachAggregate(ListenerAggregateInterface $aggregate, $priority = 1)
178
    {
179
        
180 2
    }
181
182
    /**
183
     * Detach a listener aggregate
184
     *
185
     * @param  ListenerAggregateInterface $aggregate
186
     * @return void return value of {@link ListenerAggregateInterface::detach()}
187
     */
188 1
    public function detachAggregate(ListenerAggregateInterface $aggregate)
189
    {
190
        
191 1
    }
192
193
    /**
194
     * Inject a SharedEventManager instance
195
     *
196
     * @param  SharedEventManagerInterface $sharedEventManager
197
     * @return SharedEventManagerAwareInterface
198
     */
199 1
    public function setSharedManager(SharedEventManagerInterface $sharedEventManager)
200
    {
201 1
        $this->sharedEventManager = $sharedEventManager;
202
        
203 1
        return $this;
204
    }
205
206
    /**
207
     * Get shared collections container
208
     *
209
     * @return SharedEventManagerInterface
210
     */
211 3
    public function getSharedManager()
212
    {
213 3
        return $this->sharedEventManager;
214
    }
215
216
    /**
217
     * Remove any shared collections
218
     *
219
     * @return void
220
     */
221 1
    public function unsetSharedManager()
222
    {
223 1
        $this->sharedEventManager = null;
224 1
    }
225
}
226