Skip to content

Commit f80e24e

Browse files
authored
Merge pull request #28 from yadaiio/typos
Fix typos in documentation and examples
2 parents 7789579 + d796e46 commit f80e24e

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ by individually sending a (RESTful) HTTP API request to some third party API
1212
for each record. Estimating each call to take around `0.3s` means that having
1313
`10000` users processed sequentially, you would have to wait around 50 minutes
1414
for all jobs to complete. This works perfectly fine for a small number of
15-
operations, but keeping thousands of jobs in memory at once may easly take up
15+
operations, but keeping thousands of jobs in memory at once may easily take up
1616
all resources on your side.
1717
Instead, you can use this library to stream your arbitrarily large input list
1818
as individual records to a non-blocking (async) transformation handler. It uses
@@ -141,7 +141,7 @@ also takes care of mangaging streaming throughput and back-pressure.
141141
The transformation handler can be any non-blocking (async) callable that uses
142142
[promises](#promises) to signal its eventual results. This callable receives
143143
a single data argument as passed to the writable side and must return a
144-
promise. A succesful fulfillment value will be forwarded to the readable end
144+
promise. A successful fulfillment value will be forwarded to the readable end
145145
of the stream, while an unsuccessful rejection value will emit an `error`
146146
event and then `close()` the stream.
147147

@@ -306,7 +306,7 @@ passed through its transformation handler which is responsible for processing
306306
and transforming this data (see above for more details).
307307

308308
The `Transformer` takes care of passing data you pass on its writable side to
309-
the transformation handler argument and forwarding resuling data to it
309+
the transformation handler argument and forwarding resulting data to it
310310
readable end.
311311
Each operation may take some time to complete, but due to its async nature you
312312
can actually start any number of (queued) operations. Once the concurrency limit
@@ -341,7 +341,7 @@ $transformer->write('http://example.com/');
341341
```
342342

343343
This handler receives a single data argument as passed to the writable side
344-
and must return a promise. A succesful fulfillment value will be forwarded to
344+
and must return a promise. A successful fulfillment value will be forwarded to
345345
the readable end of the stream, while an unsuccessful rejection value will
346346
emit an `error` event, try to `cancel()` all pending operations and then
347347
`close()` the stream.

examples/02-transform-all.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function ($count) {
4040
echo 'Successfully processed all ' . $count . ' user records' . PHP_EOL;
4141
},
4242
function (Exception $e) {
43-
echo 'An error occured: ' . $e->getMessage() . PHP_EOL;
43+
echo 'An error occurred: ' . $e->getMessage() . PHP_EOL;
4444
if ($e->getPrevious()) {
4545
echo 'Previous: ' . $e->getPrevious()->getMessage() . PHP_EOL;
4646
}

examples/03-transform-any.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function ($user) {
4444
echo 'Successfully processed user record:' . print_r($user, true) . PHP_EOL;
4545
},
4646
function (Exception $e) {
47-
echo 'An error occured: ' . $e->getMessage() . PHP_EOL;
47+
echo 'An error occurred: ' . $e->getMessage() . PHP_EOL;
4848
if ($e->getPrevious()) {
4949
echo 'Previous: ' . $e->getPrevious()->getMessage() . PHP_EOL;
5050
}

examples/users.ndjson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
{ "name": "sixth", "birthday": "1962-01-01", "ip": "6.1.1.1" }
77
{ "name": "seventh", "birthday": "1951-01-01", "ip": "7.1.1.1" }
88
{ "name": "eighth", "birthday": "1940-01-01", "ip": "8.1.1.1" }
9-
{ "name": "nineth", "birthday": "1939-01-01", "ip": "9.1.1.1" }
9+
{ "name": "ninth", "birthday": "1939-01-01", "ip": "9.1.1.1" }
1010
{ "name": "tenth", "birthday": "1928-01-01" }

src/Transformer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* The transformation handler can be any non-blocking (async) callable that uses
2727
* [promises](#promises) to signal its eventual results. This callable receives
2828
* a single data argument as passed to the writable side and must return a
29-
* promise. A succesful fulfillment value will be forwarded to the readable end
29+
* promise. A successful fulfillment value will be forwarded to the readable end
3030
* of the stream, while an unsuccessful rejection value will emit an `error`
3131
* event and then `close()` the stream.
3232
*
@@ -151,7 +151,7 @@
151151
* and transforming this data (see above for more details).
152152
*
153153
* The `Transformer` takes care of passing data you pass on its writable side to
154-
* the transformation handler argument and forwarding resuling data to it
154+
* the transformation handler argument and forwarding resulting data to it
155155
* readable end.
156156
* Each operation may take some time to complete, but due to its async nature you
157157
* can actually start any number of (queued) operations. Once the concurrency limit
@@ -186,7 +186,7 @@
186186
* ```
187187
*
188188
* The handler receives a single data argument as passed to the writable side
189-
* and must return a promise. A succesful fulfillment value will be forwarded to
189+
* and must return a promise. A successful fulfillment value will be forwarded to
190190
* the readable end of the stream, while an unsuccessful rejection value will
191191
* emit an `error` event, try to `cancel()` all pending operations and then
192192
* `close()` the stream.

0 commit comments

Comments
 (0)