Skip to content

Commit 1fd8b68

Browse files
committed
Update MiddlewareCollectionInterface phpdoc
1 parent a6ccc26 commit 1fd8b68

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/MiddlewareCollectionInterface.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
namespace NoGlitchYo\MiddlewareCollectionRequestHandler;
2828

29+
use NoGlitchYo\MiddlewareCollectionRequestHandler\Exception\EmptyMiddlewareCollectionException;
2930
use Psr\Http\Server\MiddlewareInterface;
3031

3132
/**
@@ -43,8 +44,13 @@ interface MiddlewareCollectionInterface
4344
public function isEmpty(): bool;
4445

4546
/**
46-
* Must return the next middleware to process in the collection.
47+
* MUST return the next middleware to process in the collection.
4748
* Depending on the implemented strategy, the middleware MAY not be removed from the collection.
49+
*
50+
* MUST throws EmptyMiddlewareCollectionException if there is not next middleware to return.
51+
*
52+
* @throws EmptyMiddlewareCollectionException
53+
*
4854
* @return MiddlewareInterface
4955
*/
5056
public function next(): MiddlewareInterface;

0 commit comments

Comments
 (0)