Skip to content

Commit 901d539

Browse files
committed
improve phpdoc of BatchResponse
1 parent bb33cbb commit 901d539

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/BatchResult.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@
1414
interface BatchResult
1515
{
1616
/**
17-
* Returns all successful responses
17+
* Returns all successful responses.
1818
*
1919
* @return ResponseInterface[]
2020
*/
2121
public function getResponses();
2222

2323
/**
24-
* Returns a response of a request
24+
* Returns the response for a successful request.
2525
*
2626
* @param RequestInterface $request
2727
*
2828
* @return ResponseInterface
2929
*
30-
* @throws \UnexpectedValueException If request is not found
30+
* @throws \UnexpectedValueException If request was not part of the batch or failed.
3131
*/
3232
public function getResponseFor(RequestInterface $request);
3333

@@ -39,7 +39,7 @@ public function getResponseFor(RequestInterface $request);
3939
public function hasResponses();
4040

4141
/**
42-
* Checks if there is a response of a request
42+
* Checks if there is a successful response for a request.
4343
*
4444
* @param RequestInterface $request
4545
*
@@ -48,17 +48,17 @@ public function hasResponses();
4848
public function hasResponseFor(RequestInterface $request);
4949

5050
/**
51-
* Adds a response in an immutable way
51+
* Adds a response in an immutable way.
5252
*
5353
* @param RequestInterface $request
5454
* @param ResponseInterface $response
5555
*
56-
* @return BatchResult
56+
* @return BatchResult the new BatchResult with this request-response pair added to it.
5757
*/
5858
public function addResponse(RequestInterface $request, ResponseInterface $response);
5959

6060
/**
61-
* Checks if a request is successful
61+
* Checks if a request was successful.
6262
*
6363
* @param RequestInterface $request
6464
*
@@ -67,7 +67,7 @@ public function addResponse(RequestInterface $request, ResponseInterface $respon
6767
public function isSuccessful(RequestInterface $request);
6868

6969
/**
70-
* Checks if a request is failed
70+
* Checks if a request has failed.
7171
*
7272
* @param RequestInterface $request
7373
*
@@ -76,25 +76,25 @@ public function isSuccessful(RequestInterface $request);
7676
public function isFailed(RequestInterface $request);
7777

7878
/**
79-
* Returns all exceptions
79+
* Returns all exceptions for the unsuccessful requests.
8080
*
8181
* @return Exception[]
8282
*/
8383
public function getExceptions();
8484

8585
/**
86-
* Returns an exception for a request
86+
* Returns the exception for a failed request.
8787
*
8888
* @param RequestInterface $request
8989
*
9090
* @return Exception
9191
*
92-
* @throws \UnexpectedValueException If request is not found
92+
* @throws \UnexpectedValueException If request was not part of the batch or was successful.
9393
*/
9494
public function getExceptionFor(RequestInterface $request);
9595

9696
/**
97-
* Checks if there is an exception for a request
97+
* Checks if there is an exception for a request.
9898
*
9999
* @param RequestInterface $request
100100
*
@@ -103,12 +103,12 @@ public function getExceptionFor(RequestInterface $request);
103103
public function hasExceptionFor(RequestInterface $request);
104104

105105
/**
106-
* Adds an exception
106+
* Adds an exception in an immutable way.
107107
*
108108
* @param RequestInterface $request
109109
* @param Exception $exception
110110
*
111-
* @return BatchResult
111+
* @return BatchResult the new BatchResult with this request-exception pair added to it.
112112
*/
113113
public function addException(RequestInterface $request, Exception $exception);
114114
}

0 commit comments

Comments
 (0)