Code Duplication    Length = 9-9 lines in 2 locations

src/Analyse/ForeignKey.php 1 location

@@ 230-238 (lines=9) @@
227
     *
228
     * @return  void
229
     */
230
    private function handleInvalidForeignKey($csvValueHash)
231
    {
232
        $csvFieldCsv = implode(', ', $this->foreignKey->fields);
233
        $errorMessage = "The value(s) of "$csvValueHash" in column(s) $csvFieldCsv
234
                    on row $this->currentCsvRow doesn't match a foreign key.";
235
236
        $this->error->setError(self::ERROR_INVALID_FOREIGN_KEY, $errorMessage);
237
        $this->statistics->setErrorRow($this->currentCsvRow);
238
    }
239
}

src/Analyse/PrimaryKey.php 1 location

@@ 179-187 (lines=9) @@
176
     *
177
     * @return  void
178
     */
179
    private function handleDuplicateHash($existingKey)
180
    {
181
        $primaryKeyColumns = implode(', ', $this->primaryKeyFields);
182
        $errorMessage = "The data in columns "$primaryKeyColumns" should be unique,
183
                but rows $existingKey & $this->rowNumber have the same values of "$this->hash"";
184
185
        $this->error->setError(self::ERROR_DUPLICATE_PRIMARY_KEY, $errorMessage);
186
        $this->statistics->setErrorRow($this->rowNumber);
187
    }
188
}