for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Acacha\Events\Http\Controllers;
use Acacha\Events\Http\Requests\DestroyEvent;
use Acacha\Events\Http\Requests\ListEvents;
use Acacha\Events\Http\Requests\ShowEvent;
use Acacha\Events\Http\Requests\StoreEvent;
use Acacha\Events\Http\Requests\UpdateEvent;
use Acacha\Events\Models\Event;
/**
* Class APIEventsController.
*
* @package App\Http\Controllers
*/
class APIEventsController extends Controller
{
* Show list of events.
* @param ListEvents $request
* @return \Illuminate\Database\Eloquent\Collection|static[]
public function index(ListEvents $request)
$request
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return Event::all();
}
* Show an event.
* @param ShowEvent $request
* @param Event $event
* @return Event
public function show(ShowEvent $request, Event $event)
return $event;
* Store an event.
* @param StoreEvent $request
* @return mixed
public function store(StoreEvent $request)
return Event::create($request->only(['name','user_id','description']));
create()
Acacha\Events\Models\Event
created()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
* Update an event.
* @param UpdateEvent $request
public function update(UpdateEvent $request , Event $event)
$event->update($request->only(['name','description']));
* Destroy an event.
* @param DestroyEvent $request
public function destroy(DestroyEvent $request, Event $event)
$event->delete();
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.