@@ -74,7 +74,7 @@ public function addReadStream($stream, $listener)
74
74
}
75
75
76
76
$ event = \event_new ();
77
- \event_set ($ event , $ stream , EV_PERSIST | EV_READ , $ this ->streamCallback );
77
+ \event_set ($ event , $ stream , \ EV_PERSIST | \ EV_READ , $ this ->streamCallback );
78
78
\event_base_set ($ event , $ this ->eventBase );
79
79
\event_add ($ event );
80
80
@@ -90,7 +90,7 @@ public function addWriteStream($stream, $listener)
90
90
}
91
91
92
92
$ event = \event_new ();
93
- \event_set ($ event , $ stream , EV_PERSIST | EV_WRITE , $ this ->streamCallback );
93
+ \event_set ($ event , $ stream , \ EV_PERSIST | \ EV_WRITE , $ this ->streamCallback );
94
94
\event_base_set ($ event , $ this ->eventBase );
95
95
\event_add ($ event );
96
96
@@ -170,7 +170,7 @@ public function addSignal($signal, $listener)
170
170
171
171
if (!isset ($ this ->signalEvents [$ signal ])) {
172
172
$ this ->signalEvents [$ signal ] = \event_new ();
173
- \event_set ($ this ->signalEvents [$ signal ], $ signal , EV_PERSIST | EV_SIGNAL , array ($ this ->signals , 'call ' ));
173
+ \event_set ($ this ->signalEvents [$ signal ], $ signal , \ EV_PERSIST | \ EV_SIGNAL , array ($ this ->signals , 'call ' ));
174
174
\event_base_set ($ this ->signalEvents [$ signal ], $ this ->eventBase );
175
175
\event_add ($ this ->signalEvents [$ signal ]);
176
176
}
@@ -194,9 +194,9 @@ public function run()
194
194
while ($ this ->running ) {
195
195
$ this ->futureTickQueue ->tick ();
196
196
197
- $ flags = EVLOOP_ONCE ;
197
+ $ flags = \ EVLOOP_ONCE ;
198
198
if (!$ this ->running || !$ this ->futureTickQueue ->isEmpty ()) {
199
- $ flags |= EVLOOP_NONBLOCK ;
199
+ $ flags |= \ EVLOOP_NONBLOCK ;
200
200
} elseif (!$ this ->readEvents && !$ this ->writeEvents && !$ this ->timerEvents ->count () && $ this ->signals ->isEmpty ()) {
201
201
break ;
202
202
}
@@ -271,11 +271,11 @@ private function createStreamCallback()
271
271
$ this ->streamCallback = function ($ stream , $ flags ) use (&$ read , &$ write ) {
272
272
$ key = (int ) $ stream ;
273
273
274
- if (EV_READ === (EV_READ & $ flags ) && isset ($ read [$ key ])) {
274
+ if (\ EV_READ === (\ EV_READ & $ flags ) && isset ($ read [$ key ])) {
275
275
\call_user_func ($ read [$ key ], $ stream );
276
276
}
277
277
278
- if (EV_WRITE === (EV_WRITE & $ flags ) && isset ($ write [$ key ])) {
278
+ if (\ EV_WRITE === (\ EV_WRITE & $ flags ) && isset ($ write [$ key ])) {
279
279
\call_user_func ($ write [$ key ], $ stream );
280
280
}
281
281
};
0 commit comments