Skip to content

Commit 11ecb3c

Browse files
authored
Merge pull request #125 from SimonFrings/docs
Fix code examples in documentation
2 parents 4b6b975 + a1070d3 commit 11ecb3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ interface that makes it easy to react to when a command is completed
144144
(i.e. either successfully fulfilled or rejected with an error):
145145

146146
```php
147-
$redis->get($key)->then(function (string $value) {
147+
$redis->get($key)->then(function (?string $value) {
148148
var_dump($value);
149149
}, function (Exception $e) {
150150
echo 'Error: ' . $e->getMessage() . PHP_EOL;
@@ -541,7 +541,7 @@ Each method call matches the respective [Redis command](https://redis.io/command
541541
For example, the `$redis->get()` method will invoke the [`GET` command](https://redis.io/commands/get).
542542

543543
```php
544-
$redis->get($key)->then(function (string $value) {
544+
$redis->get($key)->then(function (?string $value) {
545545
var_dump($value);
546546
}, function (Exception $e) {
547547
echo 'Error: ' . $e->getMessage() . PHP_EOL;

0 commit comments

Comments
 (0)