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 (35)

Security Analysis    not enabled

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.

tests/bootstrap.php (6 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
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 12 and the first side effect is on line 9.

The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.

The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.

To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.

Loading history...
2
namespace Test;
3
4
use Zend\Loader\AutoloaderFactory;
5
use Zend\Mvc\Service\ServiceManagerConfig;
6
use Zend\ServiceManager\ServiceManager;
7
use RuntimeException;
8
9
error_reporting(E_ALL | E_STRICT);
10
chdir(__DIR__);
11
12
class Bootstrap
13
{
14
    protected static $serviceManager;
15
    protected static $config;
16
    protected static $bootstrap;
17
18
    public static function init()
19
    {
20
        $zf2ModulePaths = array();
21
22
        if (isset($testConfig['module_listener_options']['module_paths'])) {
0 ignored issues
show
The variable $testConfig seems to never exist, and therefore isset should always return false. Did you maybe rename this variable?

This check looks for calls to isset(...) or empty() on variables that are yet undefined. These calls will always produce the same result and can be removed.

This is most likely caused by the renaming of a variable or the removal of a function/method parameter.

Loading history...
23
            $modulePaths = $testConfig['module_listener_options']['module_paths'];
24
            foreach ($modulePaths as $modulePath) {
25
                if (($path = static::findParentPath($modulePath)) ) {
0 ignored issues
show
Expected 0 spaces before closing bracket; 1 found
Loading history...
26
                    $zf2ModulePaths[] = $path;
27
                }
28
            }
29
        }
30
31
        $zf2ModulePaths  = implode(PATH_SEPARATOR, $zf2ModulePaths) . PATH_SEPARATOR;
32
        $zf2ModulePaths .= getenv('ZF2_MODULES_TEST_PATHS') ?: (defined('ZF2_MODULES_TEST_PATHS') ? ZF2_MODULES_TEST_PATHS : '');
33
34
        static::initAutoloader();
35
36
        // use ModuleManager to load this module and it's dependencies
37
        $config = array(
38
            'modules' => array(
39
                'ConsoleTools',
40
            ),
41
            'module_listener_options' => array(
42
                'module_paths' => explode(PATH_SEPARATOR, $zf2ModulePaths),
43
            ),
44
            'module_paths' => array(
45
                'module',
46
                'vendor',
47
            ),
48
        );
49
50
        $serviceManager = new ServiceManager(new ServiceManagerConfig());
51
        $serviceManager->setService('ApplicationConfig', $config);
52
        $serviceManager->get('ModuleManager')->loadModules();
53
54
        static::$serviceManager = $serviceManager;
55
        static::$config = $config;
56
    }
57
58
    public static function getServiceManager()
59
    {
60
        return static::$serviceManager;
61
    }
62
63
    public static function getConfig()
64
    {
65
        return static::$config;
66
    }
67
68
    protected static function initAutoloader()
69
    {
70
        $vendorPath = static::findParentPath('vendor');
71
72
        if (is_readable($vendorPath . '/autoload.php')) {
73
            $loader = include $vendorPath . '/autoload.php';
0 ignored issues
show
$loader is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
74
        } else {
75
            $zf2Path = getenv('ZF2_PATH') ?: (defined('ZF2_PATH') ? ZF2_PATH : (is_dir($vendorPath . '/ZF2/library') ? $vendorPath . '/ZF2/library' : false));
76
77
            if (!$zf2Path) {
78
                throw new RuntimeException('Unable to load ZF2. Run `php composer.phar install` or define a ZF2_PATH environment variable.');
79
            }
80
81
            include $zf2Path . '/Zend/Loader/AutoloaderFactory.php';
82
0 ignored issues
show
Blank line found at end of control structure
Loading history...
83
        }
84
85
        AutoloaderFactory::factory(array(
86
            'Zend\Loader\StandardAutoloader' => array(
87
                'autoregister_zf' => true,
88
                'namespaces' => array(
89
                    __NAMESPACE__ => __DIR__ . '/' . __NAMESPACE__,
90
                ),
91
            ),
92
        ));
93
    }
94
95
    protected static function findParentPath($path)
96
    {
97
        $dir = __DIR__;
98
        $previousDir = '.';
99
        while (!is_dir($dir . '/' . $path)) {
100
            $dir = dirname($dir);
101
            if ($previousDir === $dir) return false;
0 ignored issues
show
Coding Style Best Practice introduced by
It is generally a best practice to always use braces with control structures.

Adding braces to control structures avoids accidental mistakes as your code changes:

// Without braces (not recommended)
if (true)
    doSomething();

// Recommended
if (true) {
    doSomething();
}
Loading history...
102
            $previousDir = $dir;
103
        }
104
        return $dir . '/' . $path;
105
    }
106
}
107
108
Bootstrap::init();