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

@@ -6,15 +6,14 @@ use App\Interfaces\Widget;
/**
* Show the live map in a view
* @package App\Widgets
*/
class AirspaceMap extends Widget
{
protected $config = [
'height' => '800px',
'width' => '100%',
'lat' => 0,
'lon' => 0,
'lat' => 0,
'lon' => 0,
];
/**
@@ -23,7 +22,7 @@ class AirspaceMap extends Widget
public function run()
{
return view('widgets.airspace_map', [
'config' => $this->config,
'config' => $this->config,
]);
}
}

View File

@@ -7,7 +7,6 @@ use App\Repositories\NewsRepository;
/**
* Show the latest news in a view
* @package App\Widgets
*/
class LatestNews extends Widget
{

View File

@@ -7,7 +7,6 @@ use App\Repositories\UserRepository;
/**
* Show the latest pilots in a view
* @package App\Widgets
*/
class LatestPilots extends Widget
{

View File

@@ -8,7 +8,6 @@ use App\Repositories\PirepRepository;
/**
* Show the latest PIREPs in a view
* @package App\Widgets
*/
class LatestPireps extends Widget
{
@@ -27,7 +26,7 @@ class LatestPireps extends Widget
->whereNotInOrder('state', [
PirepState::CANCELLED,
PirepState::DRAFT,
PirepState::IN_PROGRESS
PirepState::IN_PROGRESS,
], 'created_at', 'desc')
->recent($this->config['count']);

View File

@@ -8,7 +8,6 @@ use App\Services\GeoService;
/**
* Show the live map in a view
* @package App\Widgets
*/
class LiveMap extends Widget
{
@@ -29,16 +28,16 @@ class LiveMap extends Widget
$positions = $geoSvc->getFeatureForLiveFlights($pireps);
$center_coords = setting('acars.center_coords', '0,0');
$center_coords = array_map(function($c) {
$center_coords = array_map(function ($c) {
return (float) trim($c);
}, explode(',', $center_coords));
return view('widgets.live_map', [
'config' => $this->config,
'pireps' => $pireps,
'positions' => $positions,
'center' => $center_coords,
'zoom' => setting('acars.default_zoom', 5),
'config' => $this->config,
'pireps' => $pireps,
'positions' => $positions,
'center' => $center_coords,
'zoom' => setting('acars.default_zoom', 5),
]);
}
}

View File

@@ -7,7 +7,6 @@ use App\Support\Metar;
/**
* This is a widget for the 3rd party CheckWX service
* @package App\Widgets
*/
class Weather extends Widget
{
@@ -26,7 +25,7 @@ class Weather extends Widget
* @var \App\Interfaces\Metar
*/
$klass = config('phpvms.metar');
$metar_class = new $klass;
$metar_class = new $klass();
$metar = null;
$wind = null;