Skip to content

Commit 22f845b

Browse files
committed
Fix code indentation in docs
1 parent 2ff8579 commit 22f845b

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

docs/2-usage.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,34 +40,34 @@ to ease the iteration over those endpoints. Those methods can be called by
4040
prefixing the classic method by `iterate`. Here is an example with `usersList()`:
4141

4242
```php
43-
$userNames = [];
44-
45-
/** @var JoliCode\Slack\Api\Model\ObjsUser $user */
46-
for ($client->iterateUsersList() as $user) {
47-
$userNames[] = $user->getName();
48-
}
43+
$userNames = [];
44+
45+
/** @var JoliCode\Slack\Api\Model\ObjsUser $user */
46+
for ($client->iterateUsersList() as $user) {
47+
$userNames[] = $user->getName();
48+
}
4949
```
5050

5151
The previous code hide the complexity of working with pagination's cursor. Here
5252
is the equivalent of the previous code:
5353

5454
```php
55-
$userNames = [];
56-
$cursor = '';
57-
58-
do {
59-
$response = $client->usersList([
60-
'limit' => 200,
61-
'cursor' => $cursor,
62-
]);
63-
64-
/** @var JoliCode\Slack\Api\Model\ObjsUser $user */
65-
foreach ($response->getUsers() as $user) {
66-
$userNames[] = $user->getName();
67-
}
68-
69-
$cursor = $response->getResponseMetadata() ? $response->getResponseMetadata()->getNextCursor() : '';
70-
} while (!empty($cursor));
55+
$userNames = [];
56+
$cursor = '';
57+
58+
do {
59+
$response = $client->usersList([
60+
'limit' => 200,
61+
'cursor' => $cursor,
62+
]);
63+
64+
/** @var JoliCode\Slack\Api\Model\ObjsUser $user */
65+
foreach ($response->getUsers() as $user) {
66+
$userNames[] = $user->getName();
67+
}
68+
69+
$cursor = $response->getResponseMetadata() ? $response->getResponseMetadata()->getNextCursor() : '';
70+
} while (!empty($cursor));
7171
```
7272

7373
>Note: the virtual methods are not yet documented with PHPDoc so your IDE will

0 commit comments

Comments
 (0)