Code Duplication    Length = 16-16 lines in 2 locations

src/Form/Field.php 2 locations

@@ 1141-1156 (lines=16) @@
1138
     *
1139
     * @return mixed
1140
     */
1141
    protected function getElementClassString()
1142
    {
1143
        $elementClass = $this->getElementClass();
1144
1145
        if (Arr::isAssoc($elementClass)) {
1146
            $classes = [];
1147
1148
            foreach ($elementClass as $index => $class) {
1149
                $classes[$index] = is_array($class) ? implode(' ', $class) : $class;
1150
            }
1151
1152
            return $classes;
1153
        }
1154
1155
        return implode(' ', $elementClass);
1156
    }
1157
1158
    /**
1159
     * Get element class selector.
@@ 1163-1178 (lines=16) @@
1160
     *
1161
     * @return string|array
1162
     */
1163
    protected function getElementClassSelector()
1164
    {
1165
        $elementClass = $this->getElementClass();
1166
1167
        if (Arr::isAssoc($elementClass)) {
1168
            $classes = [];
1169
1170
            foreach ($elementClass as $index => $class) {
1171
                $classes[$index] = '.'.(is_array($class) ? implode('.', $class) : $class);
1172
            }
1173
1174
            return $classes;
1175
        }
1176
1177
        return '.'.implode('.', $elementClass);
1178
    }
1179
1180
    /**
1181
     * Add the element class.