Completed
Push — master ( c4c611...f534a2 )
by Derek Stephen
08:07
created

FirewallPackage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 32
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A addToContainer() 0 4 1
A getMiddleware() 0 6 1
A getGlobalMiddleware() 0 6 1
1
<?php declare(strict_types=1);
2
3
namespace Bone\Firewall;
4
5
use Barnacle\Container;
6
use Barnacle\RegistrationInterface;
7
use Bone\Http\GlobalMiddlewareRegistrationInterface;
8
9
class FirewallPackage implements RegistrationInterface, GlobalMiddlewareRegistrationInterface
10
{
11
    /**
12
     * @param Container $c
13 1
     */
14
    public function addToContainer(Container $c)
15 1
    {
16 1
17 1
    }
18
19
    /**
20
     * @param Container $c
21
     * @return array
22
     */
23
    public function getMiddleware(Container $c): array
24
    {
25
        return [
26
            new RouteFirewall($c),
27
        ];
28
    }
29
30
    /**
31
     * @param Container $c
32
     * @return array
33
     */
34
    public function getGlobalMiddleware(Container $c): array
35
    {
36
        return [
37
            RouteFirewall::class
38
        ];
39
    }
40
}
41