GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (6)

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.

Manager/InMemoryRouteManager.php (3 issues)

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
/*
4
 * This file is part of the Tadcka package.
5
 *
6
 * (c) Tadas Gliaubicas <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Tadcka\Component\Routing\Manager;
13
14
use Tadcka\Component\Routing\Exception\RoutingRuntimeException;
15
use Tadcka\Component\Routing\Model\Manager\RouteManager;
16
use Tadcka\Component\Routing\Model\Manager\RouteManagerInterface;
17
use Tadcka\Component\Routing\Model\RouteInterface;
18
19
/**
20
 * @author Tadas Gliaubicas <[email protected]>
21
 *
22
 * @since 9/1/14 8:30 PM
23
 */
24
class InMemoryRouteManager extends RouteManager
25
{
26
    /**
27
     * @var RouteManagerInterface
28
     */
29
    private $routeManager;
30
31
    /**
32
     * @var array|RouteInterface[]
33
     */
34
    private $routes = array();
35
36
    /**
37
     * Constructor.
38
     *
39
     * @param RouteManagerInterface $routeManager
40
     */
41 1
    public function __construct(RouteManagerInterface $routeManager)
42
    {
43 1
        $this->routeManager = $routeManager;
44 1
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function findAllNameAndPattern()
50
    {
51
        return $this->routeManager->findAllNameAndPattern();
52
    }
53
54
    /**
55
     * {@inheritdoc}
56
     */
57
    public function findByName($name)
58
    {
59
        if (isset($this->routes[$name])) {
60
            return $this->routes[$name];
61
        }
62
63
        return $this->routeManager->findByName($name);
64
    }
65
66
    /**
67
     * {@inheritdoc}
68
     */
69
    public function findVisibleByName($name)
70
    {
71
        if (isset($this->routes[$name])) {
72
            $route = $this->routes[$name];
73
74
            return $route->isVisible() ? $route : null;
75
        }
76
77
        return $this->routeManager->findVisibleByName($name);
78
    }
79
80
    /**
81
     * {@inheritdoc}
82
     */
83
    public function findByNames(array $names)
84
    {
85
        $routes = array();
86
        $diffNames = array_diff($names, array_keys($this->routes));
87
88
        foreach ($this->routes as $name => $route) {
89
            if (in_array($name, $names)) {
90
                $routes[] = $route;
91
            }
92
        }
93
94
        return array_merge($routes, $this->routeManager->findByNames($diffNames));
95
    }
96
97
    /**
98
     * {@inheritdoc}
99
     */
100 View Code Duplication
    public function findVisibleByNames(array $names)
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
101
    {
102
        $routes = array();
103
        $diffNames = array_diff($names, array_keys($this->routes));
104
105
        foreach ($this->routes as $name => $route) {
106
            if (in_array($name, $names) && $route->isVisible()) {
107
                $routes[] = $route;
108
            }
109
        }
110
111
        return array_merge($routes, $this->routeManager->findVisibleByNames($diffNames));
112
    }
113
114
    /**
115
     * {@inheritdoc}
116
     */
117
    public function findByRoutePattern($routePattern)
118
    {
119
        foreach ($this->routes as $route) {
120
            if ($routePattern === $route->getRoutePattern()) {
121
                return $route;
122
            }
123
        }
124
125
        return $this->routeManager->findByRoutePattern($routePattern);
126
    }
127
128
    /**
129
     * {@inheritdoc}
130
     */
131 View Code Duplication
    public function findByRoutePatterns(array $routePatterns)
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
132
    {
133
        $result = array();
134
        foreach ($routePatterns as $routePattern) {
135
            foreach ($this->routes as $route) {
136
                if ($routePattern === $route->getRoutePattern()) {
137
                    $result[$routePattern] = $route;
138
                }
139
            }
140
        }
141
142
        $diffRoutePatterns = array_diff($routePatterns, array_keys($result));
143
144
        return array_merge(array_values($result), $this->routeManager->findByRoutePatterns($diffRoutePatterns));
145
    }
146
147
    /**
148
     * {@inheritdoc}
149
     */
150 View Code Duplication
    public function findVisibleByRoutePatterns(array $routePatterns)
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
151
    {
152
        $result = array();
153
        foreach ($routePatterns as $routePattern) {
154
            foreach ($this->routes as $route) {
155
                if (($routePattern === $route->getRoutePattern()) && $route->isVisible()) {
156
                    $result[$routePattern] = $route;
157
                }
158
            }
159
        }
160
161
        $diffRoutePatterns = array_diff($routePatterns, array_keys($result));
162
163
        return array_merge(array_values($result), $this->routeManager->findVisibleByRoutePatterns($diffRoutePatterns));
164
    }
165
166
    /**
167
     * {@inheritdoc}
168
     */
169
    public function all()
170
    {
171
        $routes = $this->routes;
172
        foreach ($this->routeManager->all() as $route) {
173
            if (false === isset($routes[$route->getName()])) {
174
                $routes[$route->getName()] = $route;
175
            }
176
        }
177
178
        return array_values($routes);
179
    }
180
181
    /**
182
     * {@inheritdoc}
183
     */
184 1
    public function add(RouteInterface $route, $save = false)
185
    {
186 1
        if (!$route->getName()) {
187 1
            throw new RoutingRuntimeException('Route name is empty!');
188
        }
189
190
        $this->routes[$route->getName()] = $route;
191
        $this->routeManager->add($route, $save);
192
    }
193
194
    /**
195
     * {@inheritdoc}
196
     */
197
    public function remove(RouteInterface $route, $save = false)
198
    {
199
        if (isset($this->routes[$route->getName()])) {
200
            unset($this->routes[$route->getName()]);
201
        }
202
        $this->routeManager->remove($route, $save);
203
    }
204
205
    /**
206
     * {@inheritdoc}
207
     */
208
    public function save()
209
    {
210
        $this->routeManager->save();
211
    }
212
213
    /**
214
     * {@inheritdoc}
215
     */
216
    public function clear()
217
    {
218
        $this->routes = array();
219
        $this->routeManager->clear();
220
    }
221
222
    /**
223
     * {@inheritdoc}
224
     */
225
    public function getClass()
226
    {
227
        return $this->routeManager->getClass();
228
    }
229
}
230