Code Duplication    Length = 18-19 lines in 2 locations

module/Core/src/Core/Options/FieldsetCustomizationOptions.php 2 locations

@@ 152-170 (lines=19) @@
149
     *
150
     * @return array
151
     */
152
    public function getFieldFlags($field)
153
    {
154
        if (!$this->hasField($field)) {
155
            return [];
156
        }
157
158
        if (!isset($this->fields[$field]['__flags__'])) {
159
            $this->fields[$field]['__flags__'] = $this->copyArrayValues(
160
                $this->fields[$field],
161
                [
162
                    'flags' => [],
163
                    'order' => ['priority'],
164
                    'priority'
165
                ]
166
            );
167
        }
168
169
        return $this->fields[$field]['__flags__'];
170
    }
171
172
    /**
173
     * Get input filter spec for a field.
@@ 179-196 (lines=18) @@
176
     *
177
     * @return array
178
     */
179
    public function getFieldInputSpecification($field)
180
    {
181
        if (!$this->hasField($field)) {
182
            return [];
183
        }
184
185
        if (!isset($this->fields[$field]['__filter__'])) {
186
            $this->fields[$field]['__filter__'] = $this->copyArrayValues(
187
                $this->fields[$field],
188
                [
189
                    'input_filter' => [],
190
                    'required',
191
                ]
192
            );
193
        }
194
195
        return $this->fields[$field]['__filter__'];
196
    }
197
198
    /**
199
     * Copy specified keys from source to a new array.