Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 87-93 (lines=7) @@
84
            $parsedData['mainLanguageCode'] = $data['mainLanguageCode'];
85
        }
86
87
        if (array_key_exists('Section', $data) && is_array($data['Section'])) {
88
            if (!array_key_exists('_href', $data['Section'])) {
89
                throw new Exceptions\Parser("Missing '_href' attribute for Section element in UserGroupUpdate.");
90
            }
91
92
            $parsedData['sectionId'] = $this->requestParser->parseHref($data['Section']['_href'], 'sectionId');
93
        }
94
95
        if (array_key_exists('remoteId', $data)) {
96
            $parsedData['remoteId'] = $data['remoteId'];

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

@@ 101-107 (lines=7) @@
98
            $parsedData['mainLanguageCode'] = $data['mainLanguageCode'];
99
        }
100
101
        if (array_key_exists('Section', $data) && is_array($data['Section'])) {
102
            if (!array_key_exists('_href', $data['Section'])) {
103
                throw new Exceptions\Parser("Missing '_href' attribute for Section element in UserUpdate.");
104
            }
105
106
            $parsedData['sectionId'] = $this->requestParser->parseHref($data['Section']['_href'], 'sectionId');
107
        }
108
109
        if (array_key_exists('remoteId', $data)) {
110
            $parsedData['remoteId'] = $data['remoteId'];