Skip to content

Commit a0576ac

Browse files
Merge pull request #10 from enumag/patch-1
Fix DataLoaderInterface comments
2 parents 81f71d6 + beab211 commit a0576ac

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,20 +172,16 @@ $promises = \React\Promise\all([
172172

173173
### `clear($key)`
174174

175-
Clears the value at `$key` from the cache, if it exists. Returns itself for
176-
method chaining.
175+
Clears the value at `$key` from the cache, if it exists.
177176

178177
- `@param mixed key: An key value to clear.`
179178

180179
### `clearAll()`
181180

182-
Clears the entire cache. Returns itself for method chaining.
181+
Clears the entire cache.
183182

184183
### `prime($key, $value)`
185184

186185
Primes the cache with the provided key and value. If the key already exists, no
187186
change is made. (To forcefully prime the cache, clear the key first with
188-
`$loader->clear($key)->prime($key, $value)`. Returns itself for method chaining.
189-
190-
191-
187+
`$loader->clear($key)->prime($key, $value)`.

src/DataLoaderInterface.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function load($key): ExtendedPromiseInterface;
3737
public function loadMany(array $keys): ExtendedPromiseInterface;
3838

3939
/**
40-
* Clears the value for the given key from the cache if it exists. Returns itself for method chaining.
40+
* Clears the value for the given key from the cache if it exists.
4141
*
4242
* @param int|string $key
4343
*
@@ -46,15 +46,14 @@ public function loadMany(array $keys): ExtendedPromiseInterface;
4646
public function clear($key): void;
4747

4848
/**
49-
* Clears the entire cache. Returns itself for method chaining.
49+
* Clears the entire cache.
5050
*
5151
* @return void
5252
*/
5353
public function clearAll(): void;
5454

5555
/**
5656
* Adds the given key and value to the cache. If the key already exists no change is made.
57-
* Returns itself for method chaining.
5857
*
5958
* @param int|string $key
6059
* @param int|string $value

0 commit comments

Comments
 (0)