@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | use unreal4u\MQTT\Application\Message; |
| 6 | 6 | use unreal4u\MQTT\Application\SimplePayload; |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | use Monolog\Handler\StreamHandler; |
| 6 | 6 | use Monolog\Logger; |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | use unreal4u\MQTT\Application\Message; |
| 6 | 6 | use unreal4u\MQTT\Application\SimplePayload; |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | declare(strict_types = 1); |
| 8 | 8 | chdir(__DIR__ . '/../'); |
| 9 | 9 | |
| 10 | -include __DIR__.'/../vendor/autoload.php'; |
|
| 10 | +include __DIR__ . '/../vendor/autoload.php'; |
|
| 11 | 11 | |
| 12 | 12 | error_reporting(E_ALL); |
| 13 | 13 | ini_set('display_errors', '1'); |
@@ -16,10 +16,10 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | function str2bin($str) |
| 18 | 18 | { |
| 19 | - $out=null; |
|
| 19 | + $out = null; |
|
| 20 | 20 | $strLength = \strlen($str); |
| 21 | - for($a=0; $a < $strLength; $a++) { |
|
| 22 | - $dec = \ord(substr($str,$a,1)); //determine symbol ASCII-code |
|
| 21 | + for ($a = 0; $a < $strLength; $a++) { |
|
| 22 | + $dec = \ord(substr($str, $a, 1)); //determine symbol ASCII-code |
|
| 23 | 23 | $bin = sprintf('%08d', base_convert($dec, 10, 2)); //convert to binary representation and add leading zeros |
| 24 | 24 | $out .= $bin; |
| 25 | 25 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace unreal4u\MQTT\Protocol; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace unreal4u\MQTT\Protocol; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace unreal4u\MQTT\Protocol; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace unreal4u\MQTT\Protocol; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace unreal4u\MQTT\Protocol; |
| 6 | 6 | |