From 2161854d3ec79859cb6b93a6647382c92c415875 Mon Sep 17 00:00:00 2001 From: Arnaud RITTI Date: Tue, 2 May 2023 23:31:51 +0200 Subject: [PATCH] style: make FormNormalizer cleaner Signed-off-by: Arnaud RITTI --- src/Serializer/FormNormalizer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Serializer/FormNormalizer.php b/src/Serializer/FormNormalizer.php index f5a35d2..ddddd7a 100644 --- a/src/Serializer/FormNormalizer.php +++ b/src/Serializer/FormNormalizer.php @@ -103,7 +103,7 @@ private function convertFormToArray(FormInterface $form): array private function parseFormData(FormInterface $form, array &$data, array $ignoredFieldTypes = [], array $verifiableFieldTypes = []): void { - if (\is_array($form->all()) && $form->count()) { + if ($form->count() > 0) { foreach ($form->all() as $field) { $this->parseFormData($field, $data, $ignoredFieldTypes, $verifiableFieldTypes); }