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

magento2/phpstan-magento2-bootstrap.php (2 issues)

Labels
Severity
1
<?php
2
3
/* Find bootstrap path */
4
$rootPath = realpath(dirname(__FILE__));
5
while (!file_exists($rootPath . '/app/bootstrap.php') && $rootPath !== '/') {
6
    $rootPath = realpath(dirname($rootPath));
7
}
8
9
/* Include Magento bootstrap file */
10
require_once $rootPath . '/app/bootstrap.php';
11
12
/* Create git hook class autoloader */
13
$_git_hook_loaded_class = [];
14
function phpstan_magento2_autoloader($class)
15
{
16
    global $_git_hook_loaded_class;
17
    if (isset($_git_hook_loaded_class[$class])) {
18
        return $_git_hook_loaded_class[$class];
19
    }
20
21
    try {
22
        /* Get Magento ObjectManager */
23
        $bootstrap     = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
0 ignored issues
show
The type Magento\Framework\App\Bootstrap was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
The constant BP was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
24
        $objectManager = $bootstrap->getObjectManager();
25
26
        $objectManager->get($class);
27
        $_git_hook_loaded_class[$class] = true;
28
    } catch (\Exception $e) {
29
        $_git_hook_loaded_class[$class] = false;
30
    }
31
32
    return $_git_hook_loaded_class[$class];
33
}
34
35
spl_autoload_register('phpstan_magento2_autoloader');
36
37