Skip to content

Commit fc25d50

Browse files
authored
Merge pull request #102 from utopia-php/fix-messages
Fix bad merge
2 parents 610b4e7 + 6517bdf commit fc25d50

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Migration/Sources/CSV.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ private function exportRows(int $batchSize): void
218218
if (isset(self::ALLOWED_INTERNALS[$key])) {
219219
continue;
220220
}
221-
throw new \Exception('Unexpected attribute in CSV: '.$key);
221+
throw new \Exception('Unexpected column in CSV: '.$key);
222222
}
223223

224224
if (isset($manyToManyKeys[$key])) {
@@ -382,12 +382,12 @@ private function validateCSVHeaders(array $headers, array $columnTypes): void
382382
$messages = [];
383383

384384
if (! empty($missingColumns)) {
385-
$label = count($missingColumns) === 1 ? 'Missing attribute' : 'Missing attributes';
385+
$label = count($missingColumns) === 1 ? 'Missing column' : 'Missing columns';
386386
$messages[] = "$label: '".implode("', '", $missingColumns)."'";
387387
}
388388

389389
if (! empty($extraColumns)) {
390-
$label = count($extraColumns) === 1 ? 'Unexpected attribute' : 'Unexpected attributes';
390+
$label = count($extraColumns) === 1 ? 'Unexpected column' : 'Unexpected columns';
391391
$messages[] = "$label: '".implode("', '", $extraColumns)."'";
392392
}
393393

0 commit comments

Comments
 (0)