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.

BrowserKitMacroServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace ProtoneMedia\LaravelBrowserKitMacro;
4
5
use Illuminate\Foundation\Testing\TestResponse as LegacyTestResponse;
0 ignored issues
show
Bug introduced by
The type Illuminate\Foundation\Testing\TestResponse 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...
6
use Illuminate\Support\ServiceProvider;
7
use Illuminate\Testing\TestResponse as ModernTestResponse;
8
9
class BrowserKitMacroServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Bootstrap any package services.
13
     *
14
     * @return void
15
     */
16
    public function boot()
17
    {
18
    }
19
20
    /**
21
     * Register any package services.
22
     *
23
     * @return void
24
     * @throws Exception
25
     */
26
    public function register()
27
    {
28
        if ($this->app->environment('production')) {
29
            return;
30
        }
31
32
        if ($this->app->runningInConsole()) {
33
            $class = class_exists(ModernTestResponse::class) ? ModernTestResponse::class : LegacyTestResponse::class;
34
35
            $class::macro('browserKit', function ($callback) {
36
                $testCase = (new BrowserKitTestCase)
37
                    ->setApp(app())
38
                    ->setResponse($this->baseResponse);
0 ignored issues
show
Bug Best Practice introduced by
The property baseResponse does not exist on ProtoneMedia\LaravelBrow...KitMacroServiceProvider. Did you maybe forget to declare it?
Loading history...
39
40
                $callback($testCase);
41
42
                return $this;
43
            });
44
        }
45
    }
46
}
47