Skip to content

Commit

Permalink
Add some missing typehints
Browse files Browse the repository at this point in the history
  • Loading branch information
TRowbotham committed Dec 15, 2023
1 parent 1c9a580 commit 1628754
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/EncodingHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class EncodingHelperTest extends TestCase
#[TestWith(['UTF-16LE', 'utf-8'])]
#[TestWith(['UTF-16BE', 'utf-8'])]
#[TestWith(['ASCII', 'ascii'])]
public function testReplacementAndUtf16EncodingsGetForcedToUtf8($encoding, $outputEncoding): void
public function testReplacementAndUtf16EncodingsGetForcedToUtf8(string $encoding, string $outputEncoding): void
{
self::assertSame($outputEncoding, EncodingHelper::getOutputEncoding($encoding));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/HostParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class HostParserTest extends TestCase
* @see https://url.spec.whatwg.org/#example-host-parsing
*/
#[DataProvider('exampleDataProvider')]
public function testHostParser(string $input, array $output)
public function testHostParser(string $input, array $output): void
{
$parser = new HostParser();
$in = new Utf8String($input);
Expand Down
2 changes: 1 addition & 1 deletion tests/Math/BrickMathAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class BrickMathAdapterTest extends MathTestCase
{
public function createNumber($number, int $base = 10): NumberInterface
public function createNumber(int|string $number, int $base = 10): NumberInterface
{
return new BrickMathAdapter($number, $base);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Math/NativeIntAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class NativeIntAdapterTest extends MathTestCase
{
public function createNumber($number, int $base = 10): NumberInterface
public function createNumber(int|string $number, int $base = 10): NumberInterface
{
return new NativeIntAdapter($number, $base);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ValidationErrorLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class ValidationErrorLogger implements LoggerInterface
{
use LoggerTrait;

private $messages;
private array $messages;

public function log($level, string|Stringable $message, array $context = []): void
{
Expand Down

0 comments on commit 1628754

Please sign in to comment.