Skip to content

Commit

Permalink
DevKit updates for 1.x branch (#384)
Browse files Browse the repository at this point in the history
* DevKit updates

* Fix cs

Co-authored-by: Vincent Langlet <vincentlanglet@hotmail.fr>
  • Loading branch information
SonataCI and VincentLanglet committed Sep 3, 2022
1 parent 745425c commit 9480415
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .php-cs-fixer.dist.php
Expand Up @@ -45,6 +45,11 @@
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true],
'ordered_class_elements' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha', 'imports_order' => ['class', 'function', 'const']],
'phpdoc_order' => ['order' => ['var', 'param', 'throws', 'return', 'phpstan-var', 'psalm-var', 'phpstan-param', 'psalm-param', 'phpstan-return', 'psalm-return']],
'phpdoc_separation' => ['groups' => [
['phpstan-template', 'phpstan-extends', 'phpstan-implements', 'phpstan-var', 'psalm-var', 'phpstan-param', 'psalm-param', 'phpstan-return', 'psalm-return'],
['psalm-suppress', 'phpstan-ignore-next-line'],
]],
'php_unit_strict' => true,
'php_unit_test_case_static_method_calls' => true,
'phpdoc_to_comment' => ['ignored_tags' => ['psalm-suppress', 'phpstan-var']],
Expand Down
1 change: 1 addition & 0 deletions src/Type/BaseDoctrineORMSerializationType.php
Expand Up @@ -53,6 +53,7 @@ class BaseDoctrineORMSerializationType extends AbstractType

/**
* @var string
*
* @phpstan-var class-string
*/
protected $class;
Expand Down
1 change: 1 addition & 0 deletions src/Type/BaseStatusType.php
Expand Up @@ -21,6 +21,7 @@ abstract class BaseStatusType extends AbstractType
{
/**
* @var string
*
* @phpstan-var class-string
*/
protected $class;
Expand Down
1 change: 1 addition & 0 deletions src/Validator/Constraints/InlineConstraint.php
Expand Up @@ -19,6 +19,7 @@
* Constraint which allows inline-validation inside services.
*
* @Annotation
*
* @Target({"CLASS"})
*/
final class InlineConstraint extends Constraint
Expand Down
6 changes: 2 additions & 4 deletions src/Validator/ErrorElement.php
Expand Up @@ -196,8 +196,6 @@ public function getSubject()
* @param string|array{0?:string, 1?:array<string, mixed>, 2?:mixed} $message
* @param array<string, mixed> $parameters
* @param mixed $value
*
* @return ErrorElement
*/
public function addViolation($message, array $parameters = [], $value = null, string $translationDomain = self::DEFAULT_TRANSLATION_DOMAIN): self
{
Expand Down Expand Up @@ -266,9 +264,9 @@ private function getValue()
/**
* @param array<string, mixed> $options
*
* @return Constraint
*
* @throws \RuntimeException
*
* @return Constraint
*/
private function newConstraint(string $name, array $options = [])
{
Expand Down

0 comments on commit 9480415

Please sign in to comment.