Skip to content

Commit

Permalink
DevKit updates
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI authored and github-actions[bot] committed Dec 18, 2023
1 parent 88e8ebf commit 8f88ec3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
14 changes: 7 additions & 7 deletions .php-cs-fixer.dist.php
Expand Up @@ -27,8 +27,9 @@
HEADER;

$rules = [
'@PHP74Migration' => true,
'@PHP74Migration:risky' => true,
'@PHP80Migration' => true,
'@PHP80Migration:risky' => true,
'@PHPUnit84Migration:risky' => true,
'@PSR12' => true,
'@PSR12:risky' => true,
'@Symfony' => true,
Expand All @@ -42,6 +43,7 @@
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'no_useless_else' => true,
'no_useless_return' => true,
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true],
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true],
'ordered_class_elements' => true,
Expand All @@ -51,16 +53,14 @@
['phpstan-template', 'phpstan-template-covariant', 'phpstan-extends', 'phpstan-implements', 'phpstan-var', 'psalm-var', 'phpstan-param', 'psalm-param', 'phpstan-return', 'psalm-return'],
['psalm-suppress', 'phpstan-ignore-next-line'],
['Assert\\*'],
['ODM\\*'],
['ORM\\*'],
]],
'php_unit_strict' => true,
'php_unit_test_case_static_method_calls' => true,
'php_unit_data_provider_name' => true,
'php_unit_data_provider_return_type' => true,
'php_unit_strict' => true,
'php_unit_test_case_static_method_calls' => true,
'phpdoc_to_comment' => ['ignored_tags' => ['psalm-suppress', 'phpstan-var']],
'single_line_throw' => false,
'static_lambda' => true,
'single_line_throw' => false,
'strict_comparison' => true,
'strict_param' => true,
'void_return' => false,
Expand Down
6 changes: 4 additions & 2 deletions src/Serializer/BlockTypeExtractor.php
Expand Up @@ -47,13 +47,15 @@ public function getTypes(string $class, string $property, array $context = []):
new Type(Type::BUILTIN_TYPE_INT, true),
new Type(Type::BUILTIN_TYPE_STRING, true),
];
} elseif ('enabled' === $property) {
}
if ('enabled' === $property) {
return [
new Type(Type::BUILTIN_TYPE_BOOL, true),
new Type(Type::BUILTIN_TYPE_INT, true),
new Type(Type::BUILTIN_TYPE_STRING, true),
];
} elseif (\in_array($property, self::NULLABLE_STRINGS, true)) {
}
if (\in_array($property, self::NULLABLE_STRINGS, true)) {
return [new Type(Type::BUILTIN_TYPE_STRING, true)];
}

Expand Down
6 changes: 4 additions & 2 deletions src/Serializer/InterfaceTypeExtractor.php
Expand Up @@ -47,7 +47,8 @@ public function getTypes(string $class, string $property, array $context = []):
null,
$this->getPageType()
)];
} elseif ('blocks' === $property) {
}
if ('blocks' === $property) {
return [new Type(
Type::BUILTIN_TYPE_OBJECT,
false,
Expand All @@ -56,7 +57,8 @@ public function getTypes(string $class, string $property, array $context = []):
null,
$this->getBlockType()
)];
} elseif ('parent' === $property) {
}
if ('parent' === $property) {
return [$this->getPageType()];
}
} elseif ($this->blockClass === $class) {
Expand Down

0 comments on commit 8f88ec3

Please sign in to comment.