@@ -59,7 +59,7 @@ public static function stop()
59
59
/**
60
60
* Defer the execution of a callback.
61
61
*
62
- * @param callable(mixed $data, string $watcherIdentifier ) $callback The callback to defer.
62
+ * @param callable(string $watcherId, mixed $data ) $callback The callback to defer.
63
63
* @param mixed $data Arbitrary data given to the callback function as the $data parameter.
64
64
*
65
65
* @return string An identifier that can be used to cancel, enable or disable the watcher.
@@ -72,7 +72,7 @@ public static function defer(callable $callback, $data = null)
72
72
/**
73
73
* Delay the execution of a callback. The time delay is approximate and accuracy is not guaranteed.
74
74
*
75
- * @param callable(mixed $data, string $watcherIdentifier ) $callback The callback to delay.
75
+ * @param callable(string $watcherId, mixed $data ) $callback The callback to delay.
76
76
* @param int $time The amount of time, in milliseconds, to delay the execution for.
77
77
* @param mixed $data Arbitrary data given to the callback function as the $data parameter.
78
78
*
@@ -86,7 +86,7 @@ public static function delay(callable $callback, $time, $data = null)
86
86
/**
87
87
* Repeatedly execute a callback. The interval between executions is approximate and accuracy is not guaranteed.
88
88
*
89
- * @param callable(mixed $data, string $watcherIdentifier ) $callback The callback to repeat.
89
+ * @param callable(string $watcherId, mixed $data ) $callback The callback to repeat.
90
90
* @param int $interval The time interval, in milliseconds, to wait between executions.
91
91
* @param mixed $data Arbitrary data given to the callback function as the $data parameter.
92
92
*
@@ -101,7 +101,7 @@ public static function repeat(callable $callback, $interval, $data = null)
101
101
* Execute a callback when a stream resource becomes readable.
102
102
*
103
103
* @param resource $stream The stream to monitor.
104
- * @param callable(resource $stream, mixed $data, string $watcherIdentifier ) $callback The callback to execute.
104
+ * @param callable(string $watcherId, resource $stream, mixed $data ) $callback The callback to execute.
105
105
* @param mixed $data Arbitrary data given to the callback function as the $data parameter.
106
106
*
107
107
* @return string An identifier that can be used to cancel, enable or disable the watcher.
@@ -115,7 +115,7 @@ public static function onReadable($stream, callable $callback, $data = null)
115
115
* Execute a callback when a stream resource becomes writable.
116
116
*
117
117
* @param resource $stream The stream to monitor.
118
- * @param callable(resource $stream, mixed $data, string $watcherIdentifier ) $callback The callback to execute.
118
+ * @param callable(string $watcherId, resource $stream, mixed $data ) $callback The callback to execute.
119
119
* @param mixed $data Arbitrary data given to the callback function as the $data parameter.
120
120
*
121
121
* @return string An identifier that can be used to cancel, enable or disable the watcher.
@@ -129,7 +129,7 @@ public static function onWritable($stream, callable $callback, $data = null)
129
129
* Execute a callback when a signal is received.
130
130
*
131
131
* @param int $signo The signal number to monitor.
132
- * @param callable(int $signo, mixed $data, string $watcherIdentifier ) $callback The callback to execute.
132
+ * @param callable(string $watcherId, int $signo, mixed $data ) $callback The callback to execute.
133
133
* @param mixed $data Arbitrary data given to the callback function as the $data parameter.
134
134
*
135
135
* @return string An identifier that can be used to cancel, enable or disable the watcher.
@@ -154,37 +154,37 @@ public static function onError(callable $callback)
154
154
/**
155
155
* Enable a watcher.
156
156
*
157
- * @param string $watcherIdentifier The watcher identifier.
157
+ * @param string $watcherId The watcher identifier.
158
158
*
159
159
* @return void
160
160
*/
161
- public static function enable ($ watcherIdentifier )
161
+ public static function enable ($ watcherId )
162
162
{
163
- self ::get ()->enable ($ watcherIdentifier );
163
+ self ::get ()->enable ($ watcherId );
164
164
}
165
165
166
166
/**
167
167
* Disable a watcher.
168
168
*
169
- * @param string $watcherIdentifier The watcher identifier.
169
+ * @param string $watcherId The watcher identifier.
170
170
*
171
171
* @return void
172
172
*/
173
- public static function disable ($ watcherIdentifier )
173
+ public static function disable ($ watcherId )
174
174
{
175
- self ::get ()->disable ($ watcherIdentifier );
175
+ self ::get ()->disable ($ watcherId );
176
176
}
177
177
178
178
/**
179
179
* Cancel a watcher.
180
180
*
181
- * @param string $watcherIdentifier The watcher identifier.
181
+ * @param string $watcherId The watcher identifier.
182
182
*
183
183
* @return void
184
184
*/
185
- public static function cancel ($ watcherIdentifier )
185
+ public static function cancel ($ watcherId )
186
186
{
187
- self ::get ()->cancel ($ watcherIdentifier );
187
+ self ::get ()->cancel ($ watcherId );
188
188
}
189
189
190
190
/**
@@ -193,13 +193,13 @@ public static function cancel($watcherIdentifier)
193
193
* This will keep the event loop alive whilst the event is still being monitored. Watchers have this state by
194
194
* default.
195
195
*
196
- * @param string $watcherIdentifier The watcher identifier.
196
+ * @param string $watcherId The watcher identifier.
197
197
*
198
198
* @return void
199
199
*/
200
- public static function reference ($ watcherIdentifier )
200
+ public static function reference ($ watcherId )
201
201
{
202
- self ::get ()->reference ($ watcherIdentifier );
202
+ self ::get ()->reference ($ watcherId );
203
203
}
204
204
205
205
/**
@@ -208,13 +208,13 @@ public static function reference($watcherIdentifier)
208
208
* The event loop should exit the run method when only unreferenced watchers are still being monitored. Events are
209
209
* all referenced by default.
210
210
*
211
- * @param string $watcherIdentifier The watcher identifier.
211
+ * @param string $watcherId The watcher identifier.
212
212
*
213
213
* @return void
214
214
*/
215
- public static function unreference ($ watcherIdentifier )
215
+ public static function unreference ($ watcherId )
216
216
{
217
- self ::get ()->unreference ($ watcherIdentifier );
217
+ self ::get ()->unreference ($ watcherId );
218
218
}
219
219
220
220
/**
0 commit comments