@@ -97,8 +97,8 @@ public function __construct(DuplexStreamInterface $stream, Executor $executor)
97
97
98
98
public function start ()
99
99
{
100
- $ this ->stream ->on ('data ' , array ( $ this , 'parse ' ) );
101
- $ this ->stream ->on ('close ' , array ( $ this , 'onClose ' ) );
100
+ $ this ->stream ->on ('data ' , [ $ this , 'parse ' ] );
101
+ $ this ->stream ->on ('close ' , [ $ this , 'onClose ' ] );
102
102
}
103
103
104
104
public function debug ($ message )
@@ -221,7 +221,7 @@ public function parse($data)
221
221
// Empty data packet during result set => row with only empty strings
222
222
$ this ->debug ('Result set empty row data ' );
223
223
224
- $ row = array () ;
224
+ $ row = [] ;
225
225
foreach ($ this ->resultFields as $ field ) {
226
226
$ row [$ field ['name ' ]] = '' ;
227
227
}
@@ -272,7 +272,7 @@ private function onResultRow($row)
272
272
{
273
273
// $this->debug('row data: ' . json_encode($row));
274
274
$ command = $ this ->currCommand ;
275
- $ command ->emit ('result ' , array ( $ row) );
275
+ $ command ->emit ('result ' , [ $ row] );
276
276
}
277
277
278
278
private function onError (Exception $ error )
@@ -283,7 +283,7 @@ private function onError(Exception $error)
283
283
$ command = $ this ->currCommand ;
284
284
$ this ->currCommand = null ;
285
285
286
- $ command ->emit ('error ' , array ( $ error) );
286
+ $ command ->emit ('error ' , [ $ error] );
287
287
}
288
288
}
289
289
@@ -322,9 +322,9 @@ public function onClose()
322
322
if ($ command instanceof QuitCommand) {
323
323
$ command ->emit ('success ' );
324
324
} else {
325
- $ command ->emit ('error ' , array (
325
+ $ command ->emit ('error ' , [
326
326
new \RuntimeException ('Connection lost ' )
327
- ) );
327
+ ] );
328
328
}
329
329
}
330
330
}
0 commit comments