File tree Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -45,15 +45,22 @@ public function __construct(string $content)
45
45
$ i += 1 + (' ' === ($ line [1 + $ i ] ?? '' ));
46
46
47
47
switch ($ field ) {
48
- case 'id ' : $ this ->id = substr ($ line , $ i ); break ;
49
- case 'event ' : $ this ->type = substr ($ line , $ i ); break ;
50
- case 'data ' : $ this ->data .= ('' === $ this ->data ? '' : "\n" ).substr ($ line , $ i ); break ;
48
+ case 'id ' :
49
+ $ this ->id = substr ($ line , $ i );
50
+ break ;
51
+ case 'event ' :
52
+ $ this ->type = substr ($ line , $ i );
53
+ break ;
54
+ case 'data ' :
55
+ $ this ->data .= ('' === $ this ->data ? '' : "\n" ).substr ($ line , $ i );
56
+ break ;
51
57
case 'retry ' :
52
58
$ retry = substr ($ line , $ i );
53
59
54
60
if ('' !== $ retry && \strlen ($ retry ) === strspn ($ retry , '0123456789 ' )) {
55
61
$ this ->retry = $ retry / 1000.0 ;
56
62
}
63
+
57
64
break ;
58
65
}
59
66
}
Original file line number Diff line number Diff line change @@ -471,11 +471,21 @@ protected function getHttpClient(string $testCase): HttpClientInterface
471
471
472
472
case 'testNonBlockingStream ' :
473
473
case 'testSeekAsyncStream ' :
474
- $ responses [] = new MockResponse ((function () { yield '<1> ' ; yield '' ; yield '<2> ' ; })(), ['response_headers ' => $ headers ]);
474
+ $ responses [] = new MockResponse (
475
+ (function () {
476
+ yield '<1> ' ;
477
+ yield '' ;
478
+ yield '<2> ' ;
479
+ })(),
480
+ ['response_headers ' => $ headers ]
481
+ );
475
482
break ;
476
483
477
484
case 'testMaxDuration ' :
478
- $ responses [] = new MockResponse ('' , ['error ' => 'Max duration was reached. ' ]);
485
+ $ responses [] = new MockResponse (
486
+ '' ,
487
+ ['error ' => 'Max duration was reached. ' ]
488
+ );
479
489
break ;
480
490
}
481
491
You can’t perform that action at this time.
0 commit comments