Code Duplication    Length = 16-16 lines in 2 locations

src/Form/Field.php 2 locations

@@ 1185-1200 (lines=16) @@
1182
     *
1183
     * @return mixed
1184
     */
1185
    protected function getElementClassString()
1186
    {
1187
        $elementClass = $this->getElementClass();
1188
1189
        if (Arr::isAssoc($elementClass)) {
1190
            $classes = [];
1191
1192
            foreach ($elementClass as $index => $class) {
1193
                $classes[$index] = is_array($class) ? implode(' ', $class) : $class;
1194
            }
1195
1196
            return $classes;
1197
        }
1198
1199
        return implode(' ', $elementClass);
1200
    }
1201
1202
    /**
1203
     * Get element class selector.
@@ 1207-1222 (lines=16) @@
1204
     *
1205
     * @return string|array
1206
     */
1207
    protected function getElementClassSelector()
1208
    {
1209
        $elementClass = $this->getElementClass();
1210
1211
        if (Arr::isAssoc($elementClass)) {
1212
            $classes = [];
1213
1214
            foreach ($elementClass as $index => $class) {
1215
                $classes[$index] = '.'.(is_array($class) ? implode('.', $class) : $class);
1216
            }
1217
1218
            return $classes;
1219
        }
1220
1221
        return '.'.implode('.', $elementClass);
1222
    }
1223
1224
    /**
1225
     * Add the element class.