@@ -113,7 +113,7 @@ |
||
| 113 | 113 | * |
| 114 | 114 | * @throws \RuntimeException If the property does not exist |
| 115 | 115 | * |
| 116 | - * @return mixed The value associated to the property |
|
| 116 | + * @return integer|null The value associated to the property |
|
| 117 | 117 | * |
| 118 | 118 | * @since 1.0.0 |
| 119 | 119 | */ |
@@ -163,8 +163,7 @@ discard block |
||
| 163 | 163 | if ($this->offsetExists($offset)) |
| 164 | 164 | { |
| 165 | 165 | return (bool) (ord($this->data[(int) ($offset / 8)]) & (1 << $offset % 8)); |
| 166 | - } |
|
| 167 | - else |
|
| 166 | + } else |
|
| 168 | 167 | { |
| 169 | 168 | throw new \OutOfRangeException('Argument offset must be a positive integer lesser than the size'); |
| 170 | 169 | } |
@@ -191,13 +190,11 @@ discard block |
||
| 191 | 190 | if ($value) |
| 192 | 191 | { |
| 193 | 192 | $this->data[$index] = chr(ord($this->data[$index]) | (1 << $offset % 8)); |
| 194 | - } |
|
| 195 | - else |
|
| 193 | + } else |
|
| 196 | 194 | { |
| 197 | 195 | $this->data[$index] = chr(ord($this->data[$index]) & ~(1 << $offset % 8)); |
| 198 | 196 | } |
| 199 | - } |
|
| 200 | - else |
|
| 197 | + } else |
|
| 201 | 198 | { |
| 202 | 199 | throw new \OutOfRangeException('Argument index must be a positive integer lesser than the size'); |
| 203 | 200 | } |
@@ -426,8 +423,7 @@ discard block |
||
| 426 | 423 | } |
| 427 | 424 | |
| 428 | 425 | return $this; |
| 429 | - } |
|
| 430 | - else |
|
| 426 | + } else |
|
| 431 | 427 | { |
| 432 | 428 | throw new \InvalidArgumentException('Argument must be of equal size'); |
| 433 | 429 | } |
@@ -456,8 +452,7 @@ discard block |
||
| 456 | 452 | } |
| 457 | 453 | |
| 458 | 454 | return $this; |
| 459 | - } |
|
| 460 | - else |
|
| 455 | + } else |
|
| 461 | 456 | { |
| 462 | 457 | throw new \InvalidArgumentException('Argument must be of equal size'); |
| 463 | 458 | } |
@@ -486,8 +481,7 @@ discard block |
||
| 486 | 481 | } |
| 487 | 482 | |
| 488 | 483 | return $this; |
| 489 | - } |
|
| 490 | - else |
|
| 484 | + } else |
|
| 491 | 485 | { |
| 492 | 486 | throw new \InvalidArgumentException('Argument must be of equal size'); |
| 493 | 487 | } |