| Conditions | 4 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 74 | 1 | public function add(...$middleware) : self |
|
| 75 | { |
||
| 76 | 1 | foreach ($middleware as $m) { |
|
| 77 | 1 | if ($m instanceof TusMiddlewareInterface) { |
|
| 78 | 1 | $this->globalMiddleware[get_class($m)] = $m; |
|
| 79 | 1 | } else if (is_string($m)) { |
|
| 80 | 1 | $this->globalMiddleware[$m] = new $m; |
|
| 81 | } |
||
| 82 | } |
||
| 83 | |||
| 84 | 1 | return $this; |
|
| 85 | } |
||
| 103 |