Skip to content

Commit

Permalink
DevKit updates for 4.x branch (sonata-project#760)
Browse files Browse the repository at this point in the history
* DevKit updates

* Fix cs

Co-authored-by: Vincent Langlet <[email protected]>
  • Loading branch information
SonataCI and VincentLanglet authored Jul 12, 2022
1 parent 7da2182 commit 075b181
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
'no_useless_return' => true,
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true],
'ordered_class_elements' => true,
'ordered_imports' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha', 'imports_order' => ['class', 'function', 'const']],
'php_unit_method_casing' => false,
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_strict' => true,
Expand Down
4 changes: 2 additions & 2 deletions src/FieldDescription/FilterTypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function guess(FieldDescriptionInterface $fieldDescription): TypeGuess

switch ($fieldDescription->getMappingType()) {
case Type::BOOL:
// TODO: Remove it when dropping support of doctrine/mongodb-odm < 3.0
// TODO: Remove it when dropping support of doctrine/mongodb-odm < 3.0
case Type::BOOLEAN:
return new TypeGuess(BooleanFilter::class, $options, Guess::HIGH_CONFIDENCE);
case Type::TIMESTAMP:
Expand All @@ -73,7 +73,7 @@ public function guess(FieldDescriptionInterface $fieldDescription): TypeGuess
return new TypeGuess(DateFilter::class, $options, Guess::HIGH_CONFIDENCE);
case Type::FLOAT:
case Type::INT:
// TODO: Remove it when dropping support of doctrine/mongodb-odm < 3.0
// TODO: Remove it when dropping support of doctrine/mongodb-odm < 3.0
case Type::INTEGER:
return new TypeGuess(NumberFilter::class, $options, Guess::MEDIUM_CONFIDENCE);
case Type::ID:
Expand Down
4 changes: 2 additions & 2 deletions src/FieldDescription/TypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function guess(FieldDescriptionInterface $fieldDescription): TypeGuess
case Type::HASH:
return new TypeGuess(FieldDescriptionInterface::TYPE_ARRAY, [], Guess::HIGH_CONFIDENCE);
case Type::BOOL:
// TODO: Remove it when dropping support of doctrine/mongodb-odm < 3.0
// TODO: Remove it when dropping support of doctrine/mongodb-odm < 3.0
case Type::BOOLEAN:
return new TypeGuess(FieldDescriptionInterface::TYPE_BOOLEAN, [], Guess::HIGH_CONFIDENCE);
case Type::TIMESTAMP:
Expand All @@ -58,7 +58,7 @@ public function guess(FieldDescriptionInterface $fieldDescription): TypeGuess
return new TypeGuess(FieldDescriptionInterface::TYPE_DATE, [], Guess::HIGH_CONFIDENCE);
case Type::FLOAT:
return new TypeGuess(FieldDescriptionInterface::TYPE_FLOAT, [], Guess::MEDIUM_CONFIDENCE);
// TODO: Remove it when dropping support of doctrine/mongodb-odm < 3.0
// TODO: Remove it when dropping support of doctrine/mongodb-odm < 3.0
case Type::INTEGER:
case Type::INT:
return new TypeGuess(FieldDescriptionInterface::TYPE_INTEGER, [], Guess::MEDIUM_CONFIDENCE);
Expand Down
2 changes: 1 addition & 1 deletion tests/Filter/ModelFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct()

public function getId(): string
{
return (string) ($this->id);
return (string) $this->id;
}
}

Expand Down

0 comments on commit 075b181

Please sign in to comment.