Skip to content

Commit 315a812

Browse files
committed
Fixed typos
Signed-off-by: snipe <[email protected]>
1 parent cfc979a commit 315a812

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

app/Importer/ManufacturerImporter.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ protected function handle($row)
2727
}
2828

2929
/**
30-
* Create a supplier if a duplicate does not exist.
30+
* Create a manufacturer if a duplicate does not exist.
3131
* @todo Investigate how this should interact with Importer::createManufacturerIfNotExists
3232
*
3333
* @author A. Gianotto
@@ -39,16 +39,16 @@ public function createManufacturerIfNotExists(array $row)
3939

4040
$editingManufacturer = false;
4141

42-
$supplier = Manufacturer::where('name', '=', $this->findCsvMatch($row, 'name'))->first();
42+
$manufacturer = Manufacturer::where('name', '=', $this->findCsvMatch($row, 'name'))->first();
4343

4444
if ($this->findCsvMatch($row, 'id')!='') {
45-
// Override supplier if an ID was given
46-
\Log::debug('Finding supplier by ID: '.$this->findCsvMatch($row, 'id'));
47-
$supplier = Manufacturer::find($this->findCsvMatch($row, 'id'));
45+
// Override manufacturer if an ID was given
46+
\Log::debug('Finding manufacturer by ID: '.$this->findCsvMatch($row, 'id'));
47+
$manufacturer = Manufacturer::find($this->findCsvMatch($row, 'id'));
4848
}
4949

5050

51-
if ($supplier) {
51+
if ($manufacturer) {
5252
if (! $this->updating) {
5353
$this->log('A matching Manufacturer '.$this->item['name'].' already exists');
5454
return;
@@ -58,8 +58,8 @@ public function createManufacturerIfNotExists(array $row)
5858
$editingManufacturer = true;
5959
} else {
6060
$this->log('No Matching Manufacturer, Create a new one');
61-
$supplier = new Manufacturer;
62-
$supplier->created_by = auth()->id();
61+
$manufacturer = new Manufacturer;
62+
$manufacturer->created_by = auth()->id();
6363
}
6464

6565
// Pull the records from the CSV to determine their values
@@ -79,21 +79,21 @@ public function createManufacturerIfNotExists(array $row)
7979

8080

8181
if ($editingManufacturer) {
82-
Log::debug('Updating existing supplier');
83-
$supplier->update($this->sanitizeItemForUpdating($supplier));
82+
Log::debug('Updating existing manufacturer');
83+
$manufacturer->update($this->sanitizeItemForUpdating($manufacturer));
8484
} else {
85-
Log::debug('Creating supplier');
86-
$supplier->fill($this->sanitizeItemForStoring($supplier));
85+
Log::debug('Creating manufacturer');
86+
$manufacturer->fill($this->sanitizeItemForStoring($manufacturer));
8787
}
8888

89-
if ($supplier->save()) {
90-
$this->log('Manufacturer '.$supplier->name.' created or updated from CSV import');
91-
return $supplier;
89+
if ($manufacturer->save()) {
90+
$this->log('Manufacturer '.$manufacturer->name.' created or updated from CSV import');
91+
return $manufacturer;
9292

9393
} else {
94-
Log::debug($supplier->getErrors());
95-
$this->logError($supplier, 'Manufacturer "'.$this->item['name'].'"');
96-
return $supplier->errors;
94+
Log::debug($manufacturer->getErrors());
95+
$this->logError($manufacturer, 'Manufacturer "'.$this->item['name'].'"');
96+
return $manufacturer->errors;
9797
}
9898

9999

0 commit comments

Comments
 (0)