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

@@ -11,7 +11,6 @@ use Illuminate\Support\Facades\Log;
/**
* Figure out what flights need to be active for today
* @package App\Cron\Nightly
*/
class SetActiveFlights extends Listener
{
@@ -38,7 +37,7 @@ class SetActiveFlights extends Listener
/**
* @var Flight $flight
*/
foreach($flights as $flight) {
foreach ($flights as $flight) {
if (!$flight->active) {
continue;
}
@@ -73,8 +72,8 @@ class SetActiveFlights extends Listener
if ($today->gte($flight->start_date) && $today->lte($flight->end_date)) {
if ($flight->days !== null && $flight->days > 0) {
$visible = Days::isToday($flight->days);
if($flight->visible !== $visible) {
Log::info('Toggling flight '.$flight->ident.' to '.($visible?'shown':'hidden').'');
if ($flight->visible !== $visible) {
Log::info('Toggling flight '.$flight->ident.' to '.($visible ? 'shown' : 'hidden').'');
$flight->visible = $visible;
if ($visible === false) {