@@ -33,7 +33,7 @@ public function stop();
3333 * @param callable(string $watcherId, mixed $data) $callback The callback to defer. The $watcherId will be invalidated before the callback call.
3434 * @param mixed $data Arbitrary data given to the callback function as the $data parameter.
3535 *
36- * @return string An identifier that can be used to cancel, enable or disable the watcher.
36+ * @return string An unique identifier that can be used to cancel, enable or disable the watcher.
3737 */
3838 public function defer (callable $ callback , $ data = null );
3939
@@ -46,7 +46,7 @@ public function defer(callable $callback, $data = null);
4646 * @param callable(string $watcherId, mixed $data) $callback The callback to delay. The $watcherId will be invalidated before the callback call.
4747 * @param mixed $data Arbitrary data given to the callback function as the $data parameter.
4848 *
49- * @return string An identifier that can be used to cancel, enable or disable the watcher.
49+ * @return string An unique identifier that can be used to cancel, enable or disable the watcher.
5050 */
5151 public function delay ($ delay , callable $ callback , $ data = null );
5252
@@ -60,7 +60,7 @@ public function delay($delay, callable $callback, $data = null);
6060 * @param callable(string $watcherId, mixed $data) $callback The callback to repeat.
6161 * @param mixed $data Arbitrary data given to the callback function as the $data parameter.
6262 *
63- * @return string An identifier that can be used to cancel, enable or disable the watcher.
63+ * @return string An unique identifier that can be used to cancel, enable or disable the watcher.
6464 */
6565 public function repeat ($ interval , callable $ callback , $ data = null );
6666
@@ -71,7 +71,7 @@ public function repeat($interval, callable $callback, $data = null);
7171 * @param callable(string $watcherId, resource $stream, mixed $data) $callback The callback to execute.
7272 * @param mixed $data Arbitrary data given to the callback function as the $data parameter.
7373 *
74- * @return string An identifier that can be used to cancel, enable or disable the watcher.
74+ * @return string An unique identifier that can be used to cancel, enable or disable the watcher.
7575 */
7676 public function onReadable ($ stream , callable $ callback , $ data = null );
7777
@@ -82,7 +82,7 @@ public function onReadable($stream, callable $callback, $data = null);
8282 * @param callable(string $watcherId, resource $stream, mixed $data) $callback The callback to execute.
8383 * @param mixed $data Arbitrary data given to the callback function as the $data parameter.
8484 *
85- * @return string An identifier that can be used to cancel, enable or disable the watcher.
85+ * @return string An unique identifier that can be used to cancel, enable or disable the watcher.
8686 */
8787 public function onWritable ($ stream , callable $ callback , $ data = null );
8888
@@ -93,7 +93,7 @@ public function onWritable($stream, callable $callback, $data = null);
9393 * @param callable(string $watcherId, int $signo, mixed $data) $callback The callback to execute.
9494 * @param mixed $data Arbitrary data given to the callback function as the $data parameter.
9595 *
96- * @return string An identifier that can be used to cancel, enable or disable the watcher.
96+ * @return string An unique identifier that can be used to cancel, enable or disable the watcher.
9797 *
9898 * @throws UnsupportedFeatureException Thrown if signal handling is not supported.
9999 */
@@ -105,6 +105,8 @@ public function onSignal($signo, callable $callback, $data = null);
105105 * @param string $watcherId The watcher identifier.
106106 *
107107 * @return void
108+ *
109+ * @throws InvalidWatcherException Thrown if the watcher identifier is invalid.
108110 */
109111 public function enable ($ watcherId );
110112
@@ -114,11 +116,13 @@ public function enable($watcherId);
114116 * @param string $watcherId The watcher identifier.
115117 *
116118 * @return void
119+ *
120+ * @throws InvalidWatcherException Thrown if the watcher identifier is invalid.
117121 */
118122 public function disable ($ watcherId );
119123
120124 /**
121- * Cancel a watcher.
125+ * Cancel a watcher. This marks the watcher as invalid. Calling this function MUST never fail, even when passed an invalid watcher.
122126 *
123127 * @param string $watcherId The watcher identifier.
124128 *
@@ -135,6 +139,8 @@ public function cancel($watcherId);
135139 * @param string $watcherId The watcher identifier.
136140 *
137141 * @return void
142+ *
143+ * @throws InvalidWatcherException Thrown if the watcher identifier is invalid.
138144 */
139145 public function reference ($ watcherId );
140146
@@ -147,6 +153,8 @@ public function reference($watcherId);
147153 * @param string $watcherId The watcher identifier.
148154 *
149155 * @return void
156+ *
157+ * @throws InvalidWatcherException Thrown if the watcher identifier is invalid.
150158 */
151159 public function unreference ($ watcherId );
152160
0 commit comments