Test Failed
Push — master ( ecae19...f3c0e1 )
by Iman
05:24
created

Middleware::middleware()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Imanghafoori\Middlewarize;
4
5
class Middleware
6
{
7
    private $object;
8
9
    /**
10
     * Middleware constructor.
11
     *
12
     * @param $object
13
     */
14
    public function __construct($object)
15
    {
16
        $this->object = $object;
17
    }
18
19
    function middleware(...$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...
20
    {
21
        return new Proxy($this->object, $middlwares);
22
    }
23
}