Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 82c05ab

Browse files
keluniktrowski
authored andcommitted
Improve enable() doc and mention it also in the class level phpdoc block
1 parent a7863b0 commit 82c05ab

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/Loop.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,8 @@ public static function onSignal($signo, callable $callback, $data = null)
271271
/**
272272
* Enable a watcher.
273273
*
274-
* Watchers (enabling or new watchers) MUST immediately be marked as enabled, but only be activated (i.e. callbacks
275-
* can be called) right before the next tick. Callbacks of watchers MUST not be called in the tick they were
276-
* enabled.
274+
* Watchers MUST immediately be marked as enabled, but only be activated (i.e. callbacks can be called) right before
275+
* the next tick. Callbacks of watchers MUST NOT be called in the tick they were enabled.
277276
*
278277
* @param string $watcherId The watcher identifier.
279278
*

src/Loop/Driver.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
/**
66
* Event loop driver which implements all basic operations to allow interoperability.
77
*
8-
* Registered callbacks MUST NOT be called from a file with strict types enabled (`declare(strict_types=1)`).
8+
* Watchers (enabled or new watchers) MUST immediately be marked as enabled, but only be activated (i.e. callbacks can
9+
* be called) right before the next tick. Callbacks of watchers MUST NOT be called in the tick they were enabled.
10+
*
11+
* All registered callbacks MUST NOT be called from a file with strict types enabled (`declare(strict_types=1)`).
912
*/
1013
abstract class Driver
1114
{
@@ -143,9 +146,8 @@ abstract public function onSignal($signo, callable $callback, $data = null);
143146
/**
144147
* Enable a watcher.
145148
*
146-
* Watchers (enabling or new watchers) MUST immediately be marked as enabled, but only be activated (i.e. callbacks
147-
* can be called) right before the next tick. Callbacks of watchers MUST not be called in the tick they were
148-
* enabled.
149+
* Watchers MUST immediately be marked as enabled, but only be activated (i.e. callbacks can be called) right before
150+
* the next tick. Callbacks of watchers MUST NOT be called in the tick they were enabled.
149151
*
150152
* @param string $watcherId The watcher identifier.
151153
*

0 commit comments

Comments
 (0)