@@ -34,6 +34,9 @@ |
||
34 | 34 | return ''; |
35 | 35 | } |
36 | 36 | |
37 | + /** |
|
38 | + * @param string $data |
|
39 | + */ |
|
37 | 40 | protected function parsePaddingData($data): int |
38 | 41 | { |
39 | 42 | if ($this->flags->hasFlag(Flag::PADDED)) { |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | namespace Hyphper\Frame; |
4 | 4 | |
5 | 5 | trait PaddingTrait |
@@ -55,7 +55,6 @@ |
||
55 | 55 | /** |
56 | 56 | * SettingsFrame constructor. |
57 | 57 | * |
58 | - * @param array $settings |
|
59 | 58 | * @param array ...$args |
60 | 59 | * @throws InvalidFrameException |
61 | 60 | */ |
@@ -95,7 +95,7 @@ |
||
95 | 95 | public function parseBody(string $data): string |
96 | 96 | { |
97 | 97 | foreach (range(0, strlen($data) - 1, 6) as $i) { |
98 | - if (!$unpack = @unpack('nname/Nvalue', substr($data, $i, $i+6))) { |
|
98 | + if (!$unpack = @unpack('nname/Nvalue', substr($data, $i, $i + 6))) { |
|
99 | 99 | throw new InvalidFrameException('Invalid SETTINGS body'); |
100 | 100 | } |
101 | 101 |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * |
7 | 7 | * @package Hyphper |
8 | 8 | */ |
9 | -declare(strict_types=1); |
|
9 | +declare(strict_types = 1); |
|
10 | 10 | |
11 | 11 | namespace Hyphper; |
12 | 12 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | |
197 | 197 | $header = pack( |
198 | 198 | 'nCCCN', |
199 | - ($this->body_len & 0xFFFF00) >> 8, // Length spread over top 24 bits |
|
199 | + ($this->body_len & 0xFFFF00) >> 8, // Length spread over top 24 bits |
|
200 | 200 | $this->body_len & 0x0000FF, |
201 | 201 | $this->type, |
202 | 202 | $flags, |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | namespace Hyphper\Frame; |
4 | 4 | |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | namespace Hyphper\Frame; |
4 | 4 | |
5 | 5 | use Hyphper\Frame\PaddingInterface; |
@@ -95,7 +95,7 @@ |
||
95 | 95 | if ($unpack = @unpack('Ndepends_on/Cstream_weight', substr($data, 0, 5))) { |
96 | 96 | $this->depends_on = $unpack['depends_on']; |
97 | 97 | $this->stream_weight = $unpack['stream_weight']; |
98 | - $this->exclusive = (bool)($this->depends_on & PriorityInterface::MASK); |
|
98 | + $this->exclusive = (bool) ($this->depends_on & PriorityInterface::MASK); |
|
99 | 99 | $this->depends_on &= ~PriorityInterface::MASK; |
100 | 100 | |
101 | 101 | return 5; |