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

@@ -28,6 +28,9 @@ class AirportController extends Controller
* Show the airport
*
* @param mixed $id
*
* @return mixed
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
*/
public function show($id, Request $request)
{

View File

@@ -54,7 +54,10 @@ class DownloadController extends Controller
/**
* Show the application dashboard.
*
* @param mixed $id
* @param string $id
*
* @return mixed
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Symfony\Component\HttpFoundation\StreamedResponse
*/
public function show($id)
{

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