Completed
Push — master ( d41cf1...36fce9 )
by Javi
23:31
created

AbstractMiddleware   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 23
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A attribute() 0 6 1
1
<?php
2
3
namespace Philae\Middlewares;
4
5
use Interop\Http\ServerMiddleware\MiddlewareInterface;
6
use League\Container\ContainerAwareInterface;
7
use League\Container\ContainerAwareTrait;
8
9
abstract class AbstractMiddleware implements MiddlewareInterface, ContainerAwareInterface
10
{
11
    use ContainerAwareTrait;
12
13
    /**
14
     * @var string Middleware attribute name
15
     */
16
    protected $attribute;
17
18
    /**
19
     * Set the middleware attribute name.
20
     *
21
     * @param string $attribute
22
     *
23
     * @return $this|self
24
     */
25
    public function attribute(string $attribute): AbstractMiddleware
26
    {
27
        $this->attribute = $attribute;
28
29
        return $this;
30
    }
31
}
32