Code Duplication    Length = 11-11 lines in 2 locations

eZ/Publish/Core/REST/Server/Input/Parser/UserGroupUpdate.php 1 location

@@ 147-157 (lines=11) @@
144
                }
145
            }
146
147
            if (array_key_exists('fields', $parsedData)) {
148
                $userGroupUpdateStruct->contentUpdateStruct = $this->contentService->newContentUpdateStruct();
149
150
                foreach ($parsedData['fields'] as $fieldDefinitionIdentifier => $fieldValue) {
151
                    $userGroupUpdateStruct->contentUpdateStruct->setField(
152
                        $fieldDefinitionIdentifier,
153
                        $fieldValue['fieldValue'],
154
                        $fieldValue['languageCode']
155
                    );
156
                }
157
            }
158
        }
159
160
        return new RestUserGroupUpdateStruct(

eZ/Publish/Core/REST/Server/Input/Parser/UserUpdate.php 1 location

@@ 171-181 (lines=11) @@
168
                }
169
            }
170
171
            if (array_key_exists('fields', $parsedData)) {
172
                $userUpdateStruct->contentUpdateStruct = $this->contentService->newContentUpdateStruct();
173
174
                foreach ($parsedData['fields'] as $fieldDefinitionIdentifier => $fieldValue) {
175
                    $userUpdateStruct->contentUpdateStruct->setField(
176
                        $fieldDefinitionIdentifier,
177
                        $fieldValue['fieldValue'],
178
                        $fieldValue['languageCode']
179
                    );
180
                }
181
            }
182
        }
183
184
        return new RestUserUpdateStruct(