Apply fixes from StyleCI

This commit is contained in:
Nabeel Shahzad
2018-08-26 16:40:04 +00:00
committed by StyleCI Bot
parent 20f46adbc4
commit 9596d88b48
407 changed files with 4032 additions and 3286 deletions

View File

@@ -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;
}