Apply fixes from StyleCI
This commit is contained in:
committed by
StyleCI Bot
parent
20f46adbc4
commit
9596d88b48
@@ -7,7 +7,6 @@ use App\Models\Fare;
|
||||
|
||||
/**
|
||||
* Import aircraft
|
||||
* @package App\Services\Import
|
||||
*/
|
||||
class FareImporter extends ImportExport
|
||||
{
|
||||
@@ -29,20 +28,22 @@ class FareImporter extends ImportExport
|
||||
|
||||
/**
|
||||
* Import a flight, parse out the different rows
|
||||
*
|
||||
* @param array $row
|
||||
* @param int $index
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function import(array $row, $index): bool
|
||||
{
|
||||
# Try to add or update
|
||||
// Try to add or update
|
||||
$fare = Fare::firstOrNew([
|
||||
'code' => $row['code'],
|
||||
], $row);
|
||||
|
||||
try {
|
||||
$fare->save();
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
$this->errorLog('Error in row '.$index.': '.$e->getMessage());
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user