Code Duplication    Length = 13-13 lines in 2 locations

src/Field/ActionCollectionField.php 1 location

@@ 140-152 (lines=13) @@
137
138
                return $value;
139
            })
140
            ->setNormalizer('parameters', function (Options $options, $values) {
141
                $cleanedValues = [];
142
143
                foreach ($values as $name => $method) {
144
                    if (null === $method) {
145
                        $method = $name;
146
                    }
147
                    $cleanedValues[$name] = $method;
148
                }
149
150
151
                return $cleanedValues;
152
            })
153
        ;
154
155
        return $resolver->resolve($value);

src/Field/LinkField.php 1 location

@@ 77-89 (lines=13) @@
74
75
                return $value;
76
            })
77
            ->setNormalizer('parameters', function (Options $options, $values) {
78
                $cleanedValues = [];
79
80
                foreach ($values as $name => $method) {
81
                    if (null === $method) {
82
                        $method = $name;
83
                    }
84
                    $cleanedValues[$name] = $method;
85
                }
86
87
88
                return $cleanedValues;
89
            })
90
        ;
91
    }
92