Code Duplication    Length = 15-15 lines in 2 locations

app/Services/Import/TaskImport.php 1 location

@@ 69-83 (lines=15) @@
66
     * @param array $row
67
     * @param int   $line_number
68
     */
69
    public function import(array $row, $line_number)
70
    {
71
        $row = $this->prepare($row);
72
73
        if ($this->validateCreation($row)) {
74
            if ($this->taskModel->create($row) > 0) {
75
                $this->logger->debug('TaskImport: imported successfully line '.$line_number);
76
                $this->counter++;
77
            } else {
78
                $this->logger->error('TaskImport: creation error at line '.$line_number);
79
            }
80
        } else {
81
            $this->logger->error('TaskImport: validation error at line '.$line_number);
82
        }
83
    }
84
85
    /**
86
     * Format row before validation.

app/Services/Import/UserImport.php 1 location

@@ 57-71 (lines=15) @@
54
     * @param array $row
55
     * @param int   $line_number
56
     */
57
    public function import(array $row, $line_number)
58
    {
59
        $row = $this->prepare($row);
60
61
        if ($this->validateCreation($row)) {
62
            if ($this->userModel->create($row) !== false) {
63
                $this->logger->debug('UserImport: imported successfully line '.$line_number);
64
                $this->counter++;
65
            } else {
66
                $this->logger->error('UserImport: creation error at line '.$line_number);
67
            }
68
        } else {
69
            $this->logger->error('UserImport: validation error at line '.$line_number);
70
        }
71
    }
72
73
    /**
74
     * Format row before validation.