Code cleanup from inspection results

This commit is contained in:
Nabeel Shahzad
2018-08-26 13:50:08 -05:00
parent 0f3424f41e
commit e95b3eb366
76 changed files with 226 additions and 268 deletions

View File

@@ -284,6 +284,7 @@ class PirepController extends Controller
}
// is the aircraft in the right place?
/** @noinspection NotOptimalIfConditionsInspection */
if (setting('pireps.only_aircraft_at_dpt_airport')
&& $pirep->aircraft_id !== $pirep->dpt_airport_id) {
return $this->flashError(
@@ -356,7 +357,7 @@ class PirepController extends Controller
// set the custom fields
foreach ($pirep->fields as $field) {
if ($field->slug == null) {
if ($field->slug === null) {
$field->slug = str_slug($field->name);
}