Skip to content

Commit f283045

Browse files
committed
style: apply fixes from phpstan
1 parent 3dabc1d commit f283045

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

tests/Integration/Mapper/Fixtures/DoubleStringCaster.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44

55
namespace Tests\Tempest\Integration\Mapper\Fixtures;
66

7-
use Closure;
87
use Tempest\Mapper\Caster;
98

109
final class DoubleStringCaster implements Caster
1110
{
12-
public static function for(): string|Closure
11+
public static function for(): string
1312
{
1413
return 'string';
1514
}

tests/Integration/Mapper/Fixtures/DoubleStringSerializer.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
namespace Tests\Tempest\Integration\Mapper\Fixtures;
44

5-
use Closure;
65
use Tempest\Mapper\Serializer;
76

87
final class DoubleStringSerializer implements Serializer
98
{
10-
public static function for(): string|Closure
9+
public static function for(): string
1110
{
1211
return 'string';
1312
}

tests/Integration/Mapper/Fixtures/ObjectFactoryACaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
final class ObjectFactoryACaster implements Caster
1111
{
12-
public static function for(): string|Closure
12+
public static function for(): string
1313
{
1414
return 'string';
1515
}

tests/Integration/Mapper/Mappers/JsonToObjectMapperTestCase.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace Tests\Tempest\Integration\Mapper\Mappers;
66

77
use Tempest\Mapper\Mappers\JsonToObjectMapper;
8+
use Tempest\Mapper\MappingContext;
89
use Tests\Tempest\Integration\FrameworkIntegrationTestCase;
910
use Tests\Tempest\Integration\Mapper\Fixtures\ObjectA;
1011

@@ -25,14 +26,14 @@ public function test_json_to_object(): void
2526

2627
public function test_invalid_json(): void
2728
{
28-
$mapper = new JsonToObjectMapper();
29+
$mapper = new JsonToObjectMapper(MappingContext::default());
2930

3031
$this->assertFalse($mapper->canMap('invalid', ObjectA::class));
3132
}
3233

3334
public function test_invalid_object(): void
3435
{
35-
$mapper = new JsonToObjectMapper();
36+
$mapper = new JsonToObjectMapper(MappingContext::default());
3637

3738
$this->assertFalse($mapper->canMap('{}', 'unknown'));
3839
}

0 commit comments

Comments
 (0)