Code Duplication    Length = 16-16 lines in 3 locations

typo3/sysext/backend/Classes/Form/Element/InputDateTimeElement.php 1 location

@@ 94-109 (lines=16) @@
91
        $size = MathUtility::forceIntegerInRange($config['size'] ?? $defaultInputWidth, $this->minimumInputWidth, $this->maxInputWidth);
92
        $width = (int)$this->formMaxWidth($size);
93
94
        if (isset($config['readOnly']) && $config['readOnly']) {
95
            // Early return for read only fields
96
            $itemValue = $this->formatValue($format, $itemValue);
97
            $html = [];
98
            $html[] = '<div class="formengine-field-item t3js-formengine-field-item">';
99
            $html[] =   '<div class="form-wizards-wrap">';
100
            $html[] =       '<div class="form-wizards-element">';
101
            $html[] =           '<div class="form-control-wrap" style="max-width: ' . $width . 'px">';
102
            $html[] =               '<input class="form-control" value="' . htmlspecialchars($itemValue) . '" type="text" disabled>';
103
            $html[] =           '</div>';
104
            $html[] =       '</div>';
105
            $html[] =   '</div>';
106
            $html[] = '</div>';
107
            $resultArray['html'] = implode(LF, $html);
108
            return $resultArray;
109
        }
110
111
        $attributes = [
112
            'value' => '',

typo3/sysext/backend/Classes/Form/Element/TextElement.php 1 location

@@ 97-112 (lines=16) @@
94
            }
95
        }
96
97
        if ($config['readOnly']) {
98
            $html = [];
99
            $html[] = '<div class="formengine-field-item t3js-formengine-field-item">';
100
            $html[] =   '<div class="form-wizards-wrap">';
101
            $html[] =       '<div class="form-wizards-element">';
102
            $html[] =           '<div class="form-control-wrap" style="max-width: ' . $width . 'px">';
103
            $html[] =               '<textarea class="form-control" rows="' . $rows . '" disabled>';
104
            $html[] =                   htmlspecialchars($itemValue);
105
            $html[] =               '</textarea>';
106
            $html[] =           '</div>';
107
            $html[] =       '</div>';
108
            $html[] =   '</div>';
109
            $html[] = '</div>';
110
            $resultArray['html'] = implode(LF, $html);
111
            return $resultArray;
112
        }
113
114
        // @todo: The whole eval handling is a mess and needs refactoring
115
        foreach ($evalList as $func) {

typo3/sysext/backend/Classes/Form/Element/TextTableElement.php 1 location

@@ 102-117 (lines=16) @@
99
            }
100
        }
101
102
        if ($config['readOnly']) {
103
            $html = [];
104
            $html[] = '<div class="formengine-field-item t3js-formengine-field-item">';
105
            $html[] =   '<div class="form-wizards-wrap">';
106
            $html[] =       '<div class="form-wizards-element">';
107
            $html[] =           '<div class="form-control-wrap" style="max-width: ' . $width . 'px">';
108
            $html[] =               '<textarea class="form-control" rows="' . $rows . '" disabled>';
109
            $html[] =                   htmlspecialchars($itemValue);
110
            $html[] =               '</textarea>';
111
            $html[] =           '</div>';
112
            $html[] =       '</div>';
113
            $html[] =   '</div>';
114
            $html[] = '</div>';
115
            $resultArray['html'] = implode(LF, $html);
116
            return $resultArray;
117
        }
118
119
        // @todo: The whole eval handling is a mess and needs refactoring
120
        foreach ($evalList as $func) {