Completed
Push — master ( 24a54e...59ee2f )
by Iman
19:08 queued 09:15
created

Middlewarable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A middleware() 0 4 1
A middlewared() 0 4 1
1
<?php
2
3
namespace Imanghafoori\Middlewarize;
4
5
trait Middlewarable
6
{
7
    public function middleware($middleware)
8
    {
9
        return new Proxy($this, $middleware);
10
    }
11
12
    static function middlewared($middlwares)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
13
    {
14
        return new Proxy(self::class, $middlwares);
15
    }
16
}