ApiSecurityProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 10
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
5
namespace Xervice\Service\Service\Provider;
6
7
8
use Laravel\Lumen\Application;
9
use Xervice\Service\Middleware\Security\Authentication;
10
use Xervice\Service\Service\AbstractServiceProvider;
0 ignored issues
show
Bug introduced by
The type Xervice\Service\Service\AbstractServiceProvider 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...
11
use Xervice\Service\Service\ServiceProviderInterface;
12
13
class ApiSecurityProvider implements ServiceProviderInterface
14
{
15
    /**
16
     * @param \Laravel\Lumen\Application $app
17
     *
18
     * @return mixed
19
     */
20
    public function register(Application $app)
21
    {
22
        return $app->middleware(Authentication::class);
0 ignored issues
show
Bug introduced by
Xervice\Service\Middlewa...y\Authentication::class of type string is incompatible with the type Closure|array expected by parameter $middleware of Laravel\Lumen\Application::middleware(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

22
        return $app->middleware(/** @scrutinizer ignore-type */ Authentication::class);
Loading history...
23
    }
24
25
}