diff --git a/src/Generator/RandomGeneratorInterface.php b/src/Generator/RandomGeneratorInterface.php index 5c83cb4..80c219b 100644 --- a/src/Generator/RandomGeneratorInterface.php +++ b/src/Generator/RandomGeneratorInterface.php @@ -22,7 +22,7 @@ interface RandomGeneratorInterface /** * Generates a string of randomized binary data * - * @param int $length The number of bytes of random binary data to generate + * @param positive-int $length The number of bytes of random binary data to generate * * @return string A binary string */ diff --git a/tests/Generator/CombGeneratorTest.php b/tests/Generator/CombGeneratorTest.php index dd43d4a..75ef316 100644 --- a/tests/Generator/CombGeneratorTest.php +++ b/tests/Generator/CombGeneratorTest.php @@ -87,14 +87,16 @@ class CombGeneratorTest extends TestCase } /** - * @phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification + * @return array> */ public function lengthLessThanSix(): array { - return [[0], [1], [2], [3], [4], [5]]; + return [[1], [2], [3], [4], [5]]; } /** + * @param positive-int $length + * * @throws Exception * * @dataProvider lengthLessThanSix diff --git a/tests/Generator/RandomBytesGeneratorTest.php b/tests/Generator/RandomBytesGeneratorTest.php index 1b09b07..e6259fd 100644 --- a/tests/Generator/RandomBytesGeneratorTest.php +++ b/tests/Generator/RandomBytesGeneratorTest.php @@ -15,7 +15,7 @@ use function hex2bin; class RandomBytesGeneratorTest extends TestCase { /** - * @phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification + * @return array */ public function lengthAndHexDataProvider(): array { @@ -27,6 +27,8 @@ class RandomBytesGeneratorTest extends TestCase } /** + * @param positive-int $length + * * @throws Exception * * @dataProvider lengthAndHexDataProvider