@@ -185,6 +185,7 @@ private function parse(?string $settings = null): \Generator
185185 $ frameHeader = yield 9 ;
186186 $ this ->receivedByteCount += 9 ;
187187
188+ /** @psalm-suppress PossiblyInvalidArrayAccess */
188189 [
189190 'length ' => $ frameLength ,
190191 'flags ' => $ frameFlags ,
@@ -282,6 +283,7 @@ private function parsePushPromise(string $frameBuffer, int $frameLength, int $fr
282283
283284 $ padding = $ isPadded ? \ord ($ header [0 ]) : 0 ;
284285
286+ /** @psalm-suppress PossiblyInvalidArrayAccess */
285287 $ pushId = \unpack ("N " , $ header )[1 ] & 0x7fffffff ;
286288
287289 if ($ frameLength - $ headerLength - $ padding < 0 ) {
@@ -418,6 +420,7 @@ private function parseHeaders(string $frameBuffer, int $frameLength, int $frameF
418420 $ padding = $ isPadded ? \ord ($ header [0 ]) : 0 ;
419421
420422 if ($ isPriority ) {
423+ /** @psalm-suppress PossiblyInvalidArrayAccess */
421424 ['parent ' => $ parent , 'weight ' => $ weight ] = \unpack ("Nparent/cweight " , $ header , $ isPadded ? 1 : 0 );
422425
423426 $ parent &= 0x7fffffff ;
@@ -475,9 +478,11 @@ private function parsePriorityFrame(string $frameBuffer, int $frameLength, int $
475478 $ this ->throwInvalidFrameSizeError ();
476479 }
477480
481+ /** @psalm-suppress PossiblyInvalidArrayAccess */
478482 ['parent ' => $ parent , 'weight ' => $ weight ] = \unpack ("Nparent/cweight " , $ frameBuffer );
479483
480- if ($ exclusive = ($ parent & 0x80000000 )) {
484+ $ exclusive = $ parent & 0x80000000 ;
485+ if ($ exclusive ) {
481486 $ parent &= 0x7fffffff ;
482487 }
483488
@@ -502,6 +507,7 @@ private function parseStreamReset(string $frameBuffer, int $frameLength, int $st
502507 $ this ->throwInvalidZeroStreamIdError ();
503508 }
504509
510+ /** @psalm-suppress PossiblyInvalidArrayAccess */
505511 $ errorCode = \unpack ('N ' , $ frameBuffer )[1 ];
506512
507513 $ this ->handler ->handleStreamReset ($ streamId , $ errorCode );
@@ -534,6 +540,7 @@ private function parseSettings(string $frameBuffer, int $frameLength, int $frame
534540 $ settings = [];
535541
536542 while ($ frameLength > 0 ) {
543+ /** @psalm-suppress PossiblyInvalidArrayAccess */
537544 ['key ' => $ key , 'value ' => $ value ] = \unpack ("nkey/Nvalue " , $ frameBuffer );
538545
539546 if ($ value < 0 ) {
@@ -581,6 +588,7 @@ private function parseGoAway(string $frameBuffer, int $frameLength, int $streamI
581588 $ this ->throwInvalidNonZeroStreamIdError ();
582589 }
583590
591+ /** @psalm-suppress PossiblyInvalidArrayAccess */
584592 ['last ' => $ lastId , 'error ' => $ error ] = \unpack ("Nlast/Nerror " , $ frameBuffer );
585593
586594 $ this ->handler ->handleShutdown ($ lastId & 0x7fffffff , $ error , \substr ($ frameBuffer , 8 ));
@@ -593,6 +601,7 @@ private function parseWindowUpdate(string $frameBuffer, int $frameLength, int $s
593601 $ this ->throwInvalidFrameSizeError ();
594602 }
595603
604+ /** @psalm-suppress PossiblyInvalidArrayAccess */
596605 $ windowSize = \unpack ('N ' , $ frameBuffer )[1 ];
597606
598607 if ($ windowSize === 0 ) {
0 commit comments