| Total Complexity | 3 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | abstract class MiddlewareCollector |
||
| 15 | { |
||
| 16 | use CallableResolver; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Tip of the middleware stack. |
||
| 20 | * |
||
| 21 | * @var MiddlewareNode |
||
| 22 | */ |
||
| 23 | protected $tip; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var ContainerInterface |
||
| 27 | */ |
||
| 28 | private $container; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * MiddlewareCollector constructor. |
||
| 32 | * @param ContainerInterface $container |
||
| 33 | */ |
||
| 34 | public function __construct(ContainerInterface $container) |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Last in, first out. |
||
| 41 | * |
||
| 42 | * @param MiddlewareInterface|callable $middleware |
||
| 43 | * @return MiddlewareCollector |
||
| 44 | * @throws \DI\DependencyException |
||
| 45 | * @throws \DI\NotFoundException |
||
| 46 | */ |
||
| 47 | public function middleware($middleware): self |
||
| 61 |