@@ -144,7 +144,7 @@ |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
147 | - * @param string|int $frame |
|
147 | + * @param string $frame |
|
148 | 148 | * @param int $from Byte where to start (should be inferior to $to). |
149 | 149 | * @param int $to Byte where to stop (considering it starts at 0). The `to` value include the target |
150 | 150 | * byte. |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * For the full license, take a look to the LICENSE file |
9 | 9 | * on the root directory of this project |
10 | 10 | */ |
11 | -declare(strict_types=1); |
|
11 | +declare(strict_types = 1); |
|
12 | 12 | |
13 | 13 | namespace Nekland\Woketo\Utils; |
14 | 14 | use Nekland\Woketo\Exception\Utils\NotLongEnoughException; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | if (\is_string($frame)) { |
66 | 66 | $len = BitManipulation::frameSize($frame); |
67 | 67 | |
68 | - if ($byteNumber < 0 || $byteNumber > ($len-1)) { |
|
68 | + if ($byteNumber < 0 || $byteNumber > ($len - 1)) { |
|
69 | 69 | throw new \InvalidArgumentException( |
70 | 70 | \sprintf('The frame is only %s bytes larges but you tried to get the %sth byte.', $len, $byteNumber) |
71 | 71 | ); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $res = 0; |
174 | 174 | |
175 | 175 | // for each byte, getting ord |
176 | - for($i = 0; $i < $subStringLength; $i++) { |
|
176 | + for ($i = 0; $i < $subStringLength; $i++) { |
|
177 | 177 | $res <<= 8; |
178 | 178 | $res += \ord($subString[$i]); |
179 | 179 | } |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $frame = "\0" . $frame; |
273 | 273 | } |
274 | 274 | |
275 | - switch(true) { |
|
275 | + switch (true) { |
|
276 | 276 | case $len <= 2: |
277 | 277 | $format = 'n'; |
278 | 278 | break; |