for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace WITR\Http\Controllers\Admin;
use WITR\Http\Requests;
use WITR\Http\Controllers\Controller;
use WITR\Schedule\WeeklySchedule;
use WITR\TimeSlot;
use Illuminate\Http\Request;
class ScheduleController extends Controller {
public function __construct()
{
$this->middleware('auth');
$this->middleware('editor');
}
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
$schedule = WeeklySchedule::fromTimeSlots(TimeSlot::with('djForTimeslot', 'showForTimeslot')->get());
return view('admin.schedule.index')->withSchedule($schedule);
* Update the specified resource in storage.
* @param int $id
$id
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
public function update(Request $request)
$input = $request->all();
$timeslots = TimeSlot::all();
foreach ($timeslots as $timeslot) {
$dj = $input['dj_' . $timeslot->id];
$show = $input['show_' . $timeslot->id];
$timeslot->dj = $dj;
$timeslot->show = $show;
$timeslot->save();
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.