Code Duplication    Length = 3-3 lines in 2 locations

Script/Repository/QuickInsertRepository.php 2 locations

@@ 316-318 (lines=3) @@
313
                    } else {
314
                        $variable = "'".addslashes(trim($object->{'get'.ucfirst($value)}()))."'";
315
                    }
316
                    if (trim($variable) === '' || trim($variable) === "''" || (is_numeric($variable) && $variable === 0)) {
317
                        $variable = null;
318
                    }
319
                    if ($variable !== null) {
320
                        $values[] = $variable;
321
                        $keys[] = $key;
@@ 337-339 (lines=3) @@
334
                    } else {
335
                        $variable = "'".addslashes(trim($object[$value]))."'";
336
                    }
337
                    if (trim($variable) === '' || trim($variable) === "''" || (is_numeric($variable) && $variable === 0)) {
338
                        $variable = null;
339
                    }
340
                    if ($variable !== null) {
341
                        $values[] = $variable;
342
                        $keys[] = $key;