@@ -351,7 +351,7 @@ event loop implementation first or they will throw a `BadMethodCallException` on
351351A ` stream_select() ` based event loop.
352352
353353This uses the [ ` stream_select() ` ] ( https://www.php.net/manual/en/function.stream-select.php )
354- function and is the only implementation which works out of the box with PHP.
354+ function and is the only implementation that works out of the box with PHP.
355355
356356This event loop works out of the box on PHP 5.3 through PHP 7+ and HHVM.
357357This means that no installation is required and this library works on all
@@ -468,7 +468,7 @@ run the event loop until there are no more tasks to perform.
468468
469469For many applications, this method is the only directly visible
470470invocation on the event loop.
471- As a rule of thumb, it is usally recommended to attach everything to the
471+ As a rule of thumb, it is usually recommended to attach everything to the
472472same loop instance and then run the loop once at the bottom end of the
473473application.
474474
@@ -486,7 +486,7 @@ run it will result in the application exiting without actually waiting
486486for any of the attached listeners.
487487
488488This method MUST NOT be called while the loop is already running.
489- This method MAY be called more than once after it has explicity been
489+ This method MAY be called more than once after it has explicitly been
490490[ ` stop() ` ped] ( #stop ) or after it automatically stopped because it
491491previously did no longer have anything to do.
492492
@@ -515,9 +515,10 @@ on a loop instance that has already been stopped has no effect.
515515The ` addTimer(float $interval, callable $callback): TimerInterface ` method can be used to
516516enqueue a callback to be invoked once after the given interval.
517517
518- The timer callback function MUST be able to accept a single parameter,
519- the timer instance as also returned by this method or you MAY use a
520- function which has no parameters at all.
518+ The second parameter MUST be a timer callback function that accepts
519+ the timer instance also returned by the ` addTimer ` method as its only parameter.
520+ If you don't use the timer instance inside your timer callback function
521+ you MAY use a function which has no parameters at all.
521522
522523The timer callback function MUST NOT throw an ` Exception ` .
523524The return value of the timer callback function will be ignored and has
@@ -581,9 +582,10 @@ See also [event loop implementations](#loop-implementations) for more details.
581582The ` addPeriodicTimer(float $interval, callable $callback): TimerInterface ` method can be used to
582583enqueue a callback to be invoked repeatedly after the given interval.
583584
584- The timer callback function MUST be able to accept a single parameter,
585- the timer instance as also returned by this method or you MAY use a
586- function which has no parameters at all.
585+ The second parameter MUST be a timer callback function that accepts
586+ the timer instance also returned by the ` addPeriodicTimer ` method as its only parameter.
587+ If you don't use the timer instance inside your timer callback function
588+ you MAY use a function which has no parameters at all.
587589
588590The timer callback function MUST NOT throw an ` Exception ` .
589591The return value of the timer callback function will be ignored and has
@@ -662,7 +664,7 @@ cancel a pending timer.
662664See also [ ` addPeriodicTimer() ` ] ( #addperiodictimer ) and [ example #2 ] ( examples ) .
663665
664666Calling this method on a timer instance that has not been added to this
665- loop instance or on a timer that has already been cancelled has no effect.
667+ loop instance or on a timer that has already been canceled has no effect.
666668
667669#### futureTick()
668670
@@ -720,9 +722,10 @@ register a listener to be notified when a signal has been caught by this process
720722This is useful to catch user interrupt signals or shutdown signals from
721723tools like ` supervisor ` or ` systemd ` .
722724
723- The listener callback function MUST be able to accept a single parameter,
724- the signal added by this method or you MAY use a function which
725- has no parameters at all.
725+ The second parameter MUST be a listener callback function that accepts
726+ the signal added by this method as its only parameter.
727+ If you don't use the signal inside your listener callback function
728+ you MAY use a function which has no parameters at all.
726729
727730The listener callback function MUST NOT throw an ` Exception ` .
728731The return value of the listener callback function will be ignored and has
@@ -737,14 +740,14 @@ $loop->addSignal(SIGINT, function (int $signal) {
737740
738741See also [ example #4 ] ( examples ) .
739742
740- Signaling is only available on Unix-like platform , Windows isn't
743+ Signaling is only available on Unix-like platforms , Windows isn't
741744supported due to operating system limitations.
742745This method may throw a ` BadMethodCallException ` if signals aren't
743746supported on this platform, for example when required extensions are
744747missing.
745748
746749** Note: A listener can only be added once to the same signal, any
747- attempts to add it more then once will be ignored.**
750+ attempts to add it more than once will be ignored.**
748751
749752#### removeSignal()
750753
@@ -775,9 +778,10 @@ react to this event with a single listener and then dispatch from this
775778listener. This method MAY throw an ` Exception ` if the given resource type
776779is not supported by this loop implementation.
777780
778- The listener callback function MUST be able to accept a single parameter,
779- the stream resource added by this method or you MAY use a function which
780- has no parameters at all.
781+ The second parameter MUST be a listener callback function that accepts
782+ the stream resource added by this method as its only parameter.
783+ If you don't use the stream resource inside your listener callback function
784+ you MAY use a function which has no parameters at all.
781785
782786The listener callback function MUST NOT throw an ` Exception ` .
783787The return value of the listener callback function will be ignored and has
@@ -827,9 +831,10 @@ react to this event with a single listener and then dispatch from this
827831listener. This method MAY throw an ` Exception ` if the given resource type
828832is not supported by this loop implementation.
829833
830- The listener callback function MUST be able to accept a single parameter,
831- the stream resource added by this method or you MAY use a function which
832- has no parameters at all.
834+ The second parameter MUST be a listener callback function that accepts
835+ the stream resource added by this method as its only parameter.
836+ If you don't use the stream resource inside your listener callback function
837+ you MAY use a function which has no parameters at all.
833838
834839The listener callback function MUST NOT throw an ` Exception ` .
835840The return value of the listener callback function will be ignored and has
@@ -871,7 +876,7 @@ to remove a stream that was never added or is invalid has no effect.
871876
872877## Install
873878
874- The recommended way to install this library is [ through Composer] ( https://getcomposer.org ) .
879+ The recommended way to install this library is [ through Composer] ( https://getcomposer.org/ ) .
875880[ New to Composer?] ( https://getcomposer.org/doc/00-intro.md )
876881
877882This project follows [ SemVer] ( https://semver.org/ ) .
@@ -894,7 +899,7 @@ See also [event loop implementations](#loop-implementations) for more details.
894899## Tests
895900
896901To run the test suite, you first need to clone this repo and then install all
897- dependencies [ through Composer] ( https://getcomposer.org ) :
902+ dependencies [ through Composer] ( https://getcomposer.org/ ) :
898903
899904``` bash
900905$ composer install
@@ -903,7 +908,7 @@ $ composer install
903908To run the test suite, go to the project root and run:
904909
905910``` bash
906- $ php vendor/bin/phpunit
911+ $ vendor/bin/phpunit
907912```
908913
909914## License
0 commit comments