| Conditions | 4 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 1 | public function add(...$middleware) : self |
|
| 29 | { |
||
| 30 | 1 | foreach ($middleware as $m) { |
|
| 31 | 1 | if ($m instanceof TusMiddleware) { |
|
| 32 | 1 | $this->globalMiddleware[get_class($m)] = $m; |
|
| 33 | 1 | } else if (is_string($m)) { |
|
| 34 | 1 | $this->globalMiddleware[$m] = new $m; |
|
| 35 | } |
||
| 36 | } |
||
| 37 | |||
| 38 | 1 | return $this; |
|
| 39 | } |
||
| 67 |