Skip to content

Commit 12ab4a5

Browse files
authored
Merge pull request #10 from petrknap/chores
Chores
2 parents 307049b + b43b4ae commit 12ab4a5

16 files changed

+51
-17
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"scripts": {
5454
"test": "phpunit --colors=always --testdox tests",
5555
"validate": [
56-
"phpcs --colors --standard=PSR12 --exclude=PSR12.Files.OpenTag,PSR12.Files.FileHeader,Generic.Files.LineLength src tests",
56+
"phpcs --colors --standard=PSR12 --exclude=Generic.Files.LineLength src tests",
5757
"phpstan analyse --level max src",
5858
"phpstan analyse --level 5 tests",
5959
"phpinsights analyse src --ansi --no-interaction"

src/Binary.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,27 @@
66

77
final class Binary
88
{
9-
public static function encode(string $data): Encoder
9+
public static function encode(string $data): EncoderInterface
1010
{
1111
return new Encoder($data);
1212
}
1313

14-
public static function decode(string $data): Decoder
14+
public static function decode(string $data): DecoderInterface
1515
{
1616
return new Decoder($data);
1717
}
1818

19+
/**
20+
* @see Serializer::serialize()
21+
*/
1922
public static function serialize(mixed $data): string
2023
{
2124
return (new Serializer())->serialize(serializable: $data);
2225
}
2326

27+
/**
28+
* @see Serializer::unserialize()
29+
*/
2430
public static function unserialize(string $data): mixed
2531
{
2632
return (new Serializer())->unserialize(serialized: $data);

tests/ByterTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace PetrKnap\Binary;
46

tests/Coder/Base64Test.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace PetrKnap\Binary\Coder;
46

tests/Coder/ChecksumTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace PetrKnap\Binary\Coder;
46

tests/Coder/CoderTestCase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace PetrKnap\Binary\Coder;
46

tests/Coder/HexTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace PetrKnap\Binary\Coder;
46

tests/Coder/NoCoderTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace PetrKnap\Binary\Coder;
46

tests/Coder/ZlibTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace PetrKnap\Binary\Coder;
46

tests/DecoderTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace PetrKnap\Binary;
46

0 commit comments

Comments
 (0)