Code Duplication    Length = 11-11 lines in 2 locations

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

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

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

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