@@ -48,7 +48,7 @@ class Process
48
48
private $ status = self ::STATUS_READY ;
49
49
50
50
private $ fileHandles ;
51
- private $ readedBytes ;
51
+ private $ readBytes ;
52
52
53
53
/**
54
54
* Exit codes translation table.
@@ -274,7 +274,7 @@ public function start($callback = null)
274
274
foreach ($ fh as $ type => $ fileHandle ) {
275
275
fseek ($ fileHandle , 0 );
276
276
$ data = fread ($ fileHandle , 8192 );
277
- $ this ->readedBytes [$ type ] = strlen ($ data );
277
+ $ this ->readBytes [$ type ] = strlen ($ data );
278
278
if (strlen ($ data ) > 0 ) {
279
279
call_user_func ($ callback , $ type == 1 ? self ::OUT : self ::ERR , $ data );
280
280
}
@@ -318,7 +318,7 @@ public function wait($callback = null)
318
318
{
319
319
$ this ->processInformation = proc_get_status ($ this ->process );
320
320
$ callback = $ this ->buildCallback ($ callback );
321
- while ($ this ->pipes || ( defined ('PHP_WINDOWS_VERSION_BUILD ' ) && $ this ->fileHandles ) ) {
321
+ while ($ this ->pipes || defined ('PHP_WINDOWS_VERSION_BUILD ' ) && $ this ->fileHandles ) {
322
322
$ r = $ this ->pipes ;
323
323
$ w = null ;
324
324
$ e = null ;
@@ -337,12 +337,12 @@ public function wait($callback = null)
337
337
if (defined ('PHP_WINDOWS_VERSION_BUILD ' )) {
338
338
$ fh = $ this ->fileHandles ;
339
339
foreach ($ fh as $ type => $ fileHandle ) {
340
- fseek ($ fileHandle , $ this ->readedBytes [$ type ]);
340
+ fseek ($ fileHandle , $ this ->readBytes [$ type ]);
341
341
$ data = fread ($ fileHandle , 8192 );
342
- if (isset ($ this ->readedBytes )) {
343
- $ this ->readedBytes [$ type ] += strlen ($ data );
342
+ if (isset ($ this ->readBytes )) {
343
+ $ this ->readBytes [$ type ] += strlen ($ data );
344
344
} else {
345
- $ this ->readedBytes [$ type ] = strlen ($ data );
345
+ $ this ->readBytes [$ type ] = strlen ($ data );
346
346
}
347
347
348
348
if (strlen ($ data ) > 0 ) {
@@ -719,7 +719,7 @@ protected function updateErrorOutput()
719
719
protected function updateOutput ()
720
720
{
721
721
if (defined ('PHP_WINDOWS_VERSION_BUILD ' ) && isset ($ this ->fileHandles [self ::STDOUT ]) && is_resource ($ this ->fileHandles [self ::STDOUT ])) {
722
- fseek ($ this ->fileHandles [self ::STDOUT ], $ this ->readedBytes [self ::STDOUT ]);
722
+ fseek ($ this ->fileHandles [self ::STDOUT ], $ this ->readBytes [self ::STDOUT ]);
723
723
$ this ->addOutput (stream_get_contents ($ this ->fileHandles [self ::STDOUT ]));
724
724
} elseif (isset ($ this ->pipes [self ::STDOUT ]) && is_resource ($ this ->pipes [self ::STDOUT ])) {
725
725
$ this ->addOutput (stream_get_contents ($ this ->pipes [self ::STDOUT ]));
0 commit comments