Conditions | 4 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
38 | 1 | public function add(...$middleware) : self |
|
39 | { |
||
40 | 1 | foreach ($middleware as $m) { |
|
41 | 1 | if ($m instanceof TusMiddleware) { |
|
42 | 1 | $this->globalMiddleware[\get_class($m)] = $m; |
|
43 | 1 | } elseif (\is_string($m)) { |
|
44 | 1 | $this->globalMiddleware[$m] = new $m; |
|
45 | } |
||
46 | } |
||
47 | |||
48 | 1 | return $this; |
|
49 | } |
||
67 |