Skip to content

Commit 59daa82

Browse files
committed
Update docs
1 parent 3fb5edb commit 59daa82

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

docs/docs.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,21 @@ Set the Response for the Given Method
293293
- ***string*** `$method`
294294
- ***\donatj\MockWebServer\ResponseInterface*** `$response`
295295

296+
## Class: \donatj\MockWebServer\DelayedResponse
297+
298+
DelayedResponse wraps a response, causing it when called to be delayed by a specified number of microseconds.
299+
300+
### Method: DelayedResponse->__construct
301+
302+
```php
303+
function __construct(\donatj\MockWebServer\ResponseInterface $response, $delay)
304+
```
305+
306+
#### Parameters:
307+
308+
- ***\donatj\MockWebServer\ResponseInterface*** `$response`
309+
- ***int*** `$delay` - Microseconds to delay the response
310+
296311
## Built-In Responses
297312

298313
### Class: \donatj\MockWebServer\Responses\DefaultResponse

mddoc.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ There has been work [started to implement this](https://github.com/donatj/mock-w
2929
<file name="src/Response.php"/>
3030
<file name="src/ResponseStack.php"/>
3131
<file name="src/ResponseByMethod.php"/>
32+
<file name="src/DelayedResponse.php"/>
3233
<section title="Built-In Responses">
3334
<file name="src/Responses/DefaultResponse.php"/>
3435
<file name="src/Responses/NotFoundResponse.php"/>

src/DelayedResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
namespace donatj\MockWebServer;
44

55
/**
6-
* Class DelayedResponse wraps a response and delays it a specified number of microseconds.
6+
* DelayedResponse wraps a response, causing it when called to be delayed by a specified number of microseconds.
77
*/
88
class DelayedResponse implements InitializingResponseInterface, MultiResponseInterface {
99

1010
/**
11-
* @var int
11+
* @var int Microseconds to delay the response by.
1212
*/
1313
protected $delay;
1414
/**

src/InitializingResponseInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface InitializingResponseInterface extends ResponseInterface {
77
/**
88
* @param \donatj\MockWebServer\RequestInfo $request
99
* @return void
10+
* @internal
1011
*/
1112
public function initialize( RequestInfo $request );
1213

0 commit comments

Comments
 (0)