We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e5195c commit 3996defCopy full SHA for 3996def
Annotation/Groups.php
@@ -37,7 +37,7 @@ public function __construct(string|array $groups)
37
{
38
$this->groups = (array) $groups;
39
40
- if (empty($this->groups)) {
+ if (!$this->groups) {
41
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" cannot be empty.', static::class));
42
}
43
Normalizer/FormErrorNormalizer.php
@@ -72,7 +72,7 @@ private function convertFormChildrenToArray(FormInterface $data): array
72
'errors' => $this->convertFormErrorsToArray($child),
73
];
74
75
- if (!empty($child->all())) {
+ if ($child->all()) {
76
$childData['children'] = $this->convertFormChildrenToArray($child);
77
78
0 commit comments