@@ -34,7 +34,7 @@ public function addReadStream($stream, $listener)
34
34
{
35
35
$ key = (int ) $ stream ;
36
36
37
- if (!array_key_exists ( $ key , $ this ->readStreams )) {
37
+ if (!isset ( $ this ->readStreams [ $ key ] )) {
38
38
$ this ->readStreams [$ key ] = $ stream ;
39
39
$ this ->readListeners [$ key ] = $ listener ;
40
40
}
@@ -50,7 +50,7 @@ public function addWriteStream($stream, $listener)
50
50
{
51
51
$ key = (int ) $ stream ;
52
52
53
- if (!array_key_exists ( $ key , $ this ->writeStreams )) {
53
+ if (!isset ( $ this ->writeStreams [ $ key ] )) {
54
54
$ this ->writeStreams [$ key ] = $ stream ;
55
55
$ this ->writeListeners [$ key ] = $ listener ;
56
56
}
@@ -209,7 +209,7 @@ protected function waitForStreamActivity($blocking)
209
209
foreach ($ read as $ stream ) {
210
210
$ key = (int ) $ stream ;
211
211
212
- if (array_key_exists ( $ key , $ this ->readListeners )) {
212
+ if (isset ( $ this ->readListeners [ $ key ] )) {
213
213
call_user_func ($ this ->readListeners [$ key ], $ stream , $ this );
214
214
}
215
215
}
@@ -218,7 +218,7 @@ protected function waitForStreamActivity($blocking)
218
218
foreach ($ write as $ stream ) {
219
219
$ key = (int ) $ stream ;
220
220
221
- if (array_key_exists ( $ key , $ this ->writeListeners )) {
221
+ if (isset ( $ this ->writeListeners [ $ key ] )) {
222
222
call_user_func ($ this ->writeListeners [$ key ], $ stream , $ this );
223
223
}
224
224
}
0 commit comments