Skip to content

Commit 51ce1a5

Browse files
authored
Merge pull request #18 from arnedesmedt/feature/php8.4-remove-deprecations
Remove php8.4 depreactions
2 parents 9f7af1e + 652a590 commit 51ce1a5

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/JsonSchema.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ public static function object(array $requiredProps, array $optionalProps = [], $
7272
return new ObjectType($requiredProps, $optionalProps, $additionalProperties);
7373
}
7474

75-
public static function array(Type $itemSchema, array $validation = null): ArrayType
75+
public static function array(Type $itemSchema, ?array $validation = null): ArrayType
7676
{
7777
return new ArrayType($itemSchema, $validation);
7878
}
7979

80-
public static function string(array $validation = null): StringType
80+
public static function string(?array $validation = null): StringType
8181
{
8282
return new StringType($validation);
8383
}
@@ -92,12 +92,12 @@ public static function uuid(): UuidType
9292
return new UuidType();
9393
}
9494

95-
public static function integer(array $validation = null): IntType
95+
public static function integer(?array $validation = null): IntType
9696
{
9797
return new IntType($validation);
9898
}
9999

100-
public static function float(array $validation = null): FloatType
100+
public static function float(?array $validation = null): FloatType
101101
{
102102
return new FloatType($validation);
103103
}

src/Type/ArrayType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ final class ArrayType implements AnnotatedType, PayloadSchema
4242
*/
4343
private $validation;
4444

45-
public function __construct(TypeSchema $itemSchema, array $validation = null)
45+
public function __construct(TypeSchema $itemSchema, ?array $validation = null)
4646
{
4747
$this->itemSchema = $itemSchema;
4848
$this->validation = $validation;

src/Type/FloatType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class FloatType implements AnnotatedType
3737
*/
3838
private $validation;
3939

40-
public function __construct(array $validation = null)
40+
public function __construct(?array $validation = null)
4141
{
4242
$this->validation = $validation;
4343
}

src/Type/IntType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class IntType implements AnnotatedType
3838
*/
3939
private $validation;
4040

41-
public function __construct(array $validation = null)
41+
public function __construct(?array $validation = null)
4242
{
4343
$this->validation = $validation;
4444
}

src/Type/StringType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class StringType implements AnnotatedType
3434
*/
3535
private $validation = [];
3636

37-
public function __construct(array $validation = null)
37+
public function __construct(?array $validation = null)
3838
{
3939
$this->validation = (array) $validation;
4040
}

0 commit comments

Comments
 (0)