Skip to content

Commit c8359c2

Browse files
committed
Inverse strict types logic
1 parent 8f0f761 commit c8359c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Context/RootContext.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public static function forNormalization(
2626
TypeParserInterface $parser,
2727
TypeRepositoryInterface $types,
2828
): self {
29-
// Disable strict-types for normalization if option is not set
29+
// Enable strict-types for normalization if option is not set
3030
if (!$config->isStrictTypesOptionDefined()) {
31-
$config = $config->withStrictTypes(false);
31+
$config = $config->withStrictTypes(true);
3232
}
3333

3434
// ...
@@ -50,9 +50,9 @@ public static function forDenormalization(
5050
TypeParserInterface $parser,
5151
TypeRepositoryInterface $types,
5252
): self {
53-
// Enable strict-types for denormalization if option is not set
53+
// Disable strict-types for denormalization if option is not set
5454
if (!$config->isStrictTypesOptionDefined()) {
55-
$config = $config->withStrictTypes(true);
55+
$config = $config->withStrictTypes(false);
5656
}
5757

5858
// ...

0 commit comments

Comments
 (0)