Code Duplication    Length = 16-16 lines in 2 locations

src/Form/Field.php 2 locations

@@ 1071-1086 (lines=16) @@
1068
     *
1069
     * @return mixed
1070
     */
1071
    protected function getElementClassString()
1072
    {
1073
        $elementClass = $this->getElementClass();
1074
1075
        if (Arr::isAssoc($elementClass)) {
1076
            $classes = [];
1077
1078
            foreach ($elementClass as $index => $class) {
1079
                $classes[$index] = is_array($class) ? implode(' ', $class) : $class;
1080
            }
1081
1082
            return $classes;
1083
        }
1084
1085
        return implode(' ', $elementClass);
1086
    }
1087
1088
    /**
1089
     * Get element class selector.
@@ 1093-1108 (lines=16) @@
1090
     *
1091
     * @return string|array
1092
     */
1093
    protected function getElementClassSelector()
1094
    {
1095
        $elementClass = $this->getElementClass();
1096
1097
        if (Arr::isAssoc($elementClass)) {
1098
            $classes = [];
1099
1100
            foreach ($elementClass as $index => $class) {
1101
                $classes[$index] = '.'.(is_array($class) ? implode('.', $class) : $class);
1102
            }
1103
1104
            return $classes;
1105
        }
1106
1107
        return '.'.implode('.', $elementClass);
1108
    }
1109
1110
    /**
1111
     * Add the element class.