Code Duplication    Length = 10-11 lines in 10 locations

htdocs/lib2/rowEditor.class.php 10 locations

@@ 60-69 (lines=10) @@
57
     * @param $bNullable
58
     * @param int $nInsertFunction
59
     */
60
    public function addPKFloat($sField, $nDefault, $bNullable, $nInsertFunction = RE_INSERT_NOTHING): void
61
    {
62
        $this->pk[$sField] = [
63
            'type' => RE_TYPE_FLOAT,
64
            'default' => $nDefault,
65
            'nullable' => $bNullable,
66
            'value' => $nDefault,
67
            'insertfunction' => $nInsertFunction,
68
        ];
69
    }
70
71
    /**
72
     * @param $sField
@@ 77-86 (lines=10) @@
74
     * @param $bNullable
75
     * @param int $nInsertFunction
76
     */
77
    public function addPKDouble($sField, $nDefault, $bNullable, $nInsertFunction = RE_INSERT_NOTHING): void
78
    {
79
        $this->pk[$sField] = [
80
            'type' => RE_TYPE_DOUBLE,
81
            'default' => $nDefault,
82
            'nullable' => $bNullable,
83
            'value' => $nDefault,
84
            'insertfunction' => $nInsertFunction,
85
        ];
86
    }
87
88
    /**
89
     * @param $sField
@@ 115-124 (lines=10) @@
112
     * @param $bNullable
113
     * @param int $nInsertFunction
114
     */
115
    public function addPKBoolean($sField, $bDefault, $bNullable, $nInsertFunction = RE_INSERT_NOTHING): void
116
    {
117
        $this->pk[$sField] = [
118
            'type' => RE_TYPE_BOOLEAN,
119
            'default' => $bDefault,
120
            'nullable' => $bNullable,
121
            'value' => $bDefault,
122
            'insertfunction' => $nInsertFunction,
123
        ];
124
    }
125
126
    /**
127
     * @param $sField
@@ 132-141 (lines=10) @@
129
     * @param $bNullable
130
     * @param int $nInsertFunction
131
     */
132
    public function addPKDate($sField, $dDefault, $bNullable, $nInsertFunction = RE_INSERT_NOTHING): void
133
    {
134
        $this->pk[$sField] = [
135
            'type' => RE_TYPE_DATE,
136
            'default' => $dDefault,
137
            'nullable' => $bNullable,
138
            'value' => $dDefault,
139
            'insertfunction' => $nInsertFunction,
140
        ];
141
    }
142
143
    /**
144
     * @param string $sField
@@ 149-159 (lines=11) @@
146
     * @param bool $bNullable
147
     * @param int $nInsertFunction
148
     */
149
    public function addInt($sField, $nDefault, $bNullable, $nInsertFunction = RE_INSERT_NOTHING): void
150
    {
151
        $this->fields[$sField] = [
152
            'type' => RE_TYPE_INT,
153
            'default' => $nDefault,
154
            'nullable' => $bNullable,
155
            'value' => $nDefault,
156
            'changed => false',
157
            'insertfunction' => $nInsertFunction,
158
        ];
159
    }
160
161
    /**
162
     * @param string $sField
@@ 167-177 (lines=11) @@
164
     * @param bool $bNullable
165
     * @param int $nInsertFunction
166
     */
167
    public function addFloat($sField, $nDefault, $bNullable, $nInsertFunction = RE_INSERT_NOTHING): void
168
    {
169
        $this->fields[$sField] = [
170
            'type' => RE_TYPE_FLOAT,
171
            'default' => $nDefault,
172
            'nullable' => $bNullable,
173
            'value' => $nDefault,
174
            'changed => false',
175
            'insertfunction' => $nInsertFunction,
176
        ];
177
    }
178
179
    /**
180
     * @param string $sField
@@ 185-195 (lines=11) @@
182
     * @param bool $bNullable
183
     * @param int $nInsertFunction
184
     */
185
    public function addDouble($sField, $nDefault, $bNullable, $nInsertFunction = RE_INSERT_NOTHING): void
186
    {
187
        $this->fields[$sField] = [
188
            'type' => RE_TYPE_DOUBLE,
189
            'default' => $nDefault,
190
            'nullable' => $bNullable,
191
            'value' => $nDefault,
192
            'changed => false',
193
            'insertfunction' => $nInsertFunction,
194
        ];
195
    }
196
197
    /**
198
     * @param string $sField
@@ 203-213 (lines=11) @@
200
     * @param bool $bNullable
201
     * @param int $nInsertFunction
202
     */
203
    public function addString($sField, $sDefault, $bNullable, $nInsertFunction = RE_INSERT_NOTHING): void
204
    {
205
        $this->fields[$sField] = [
206
            'type' => RE_TYPE_STRING,
207
            'default' => $sDefault,
208
            'nullable' => $bNullable,
209
            'value' => $sDefault,
210
            'changed => false',
211
            'insertfunction' => $nInsertFunction,
212
        ];
213
    }
214
215
    /**
216
     * @param string $sField
@@ 221-231 (lines=11) @@
218
     * @param bool $bNullable
219
     * @param int $nInsertFunction
220
     */
221
    public function addBoolean($sField, $bDefault, $bNullable, $nInsertFunction = RE_INSERT_NOTHING): void
222
    {
223
        $this->fields[$sField] = [
224
            'type' => RE_TYPE_BOOLEAN,
225
            'default' => $bDefault,
226
            'nullable' => $bNullable,
227
            'value' => $bDefault,
228
            'changed => false',
229
            'insertfunction' => $nInsertFunction,
230
        ];
231
    }
232
233
    /**
234
     * @param string $sField
@@ 239-249 (lines=11) @@
236
     * @param bool $bNullable
237
     * @param int $nInsertFunction
238
     */
239
    public function addDate($sField, $dDefault, $bNullable, $nInsertFunction = RE_INSERT_NOTHING): void
240
    {
241
        $this->fields[$sField] = [
242
            'type' => RE_TYPE_DATE,
243
            'default' => $dDefault,
244
            'nullable' => $bNullable,
245
            'value' => $dDefault,
246
            'changed => false',
247
            'insertfunction' => $nInsertFunction,
248
        ];
249
    }
250
251
    /**
252
     * @param $sField