for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Gitamin\Http\Controllers\Api;
use Gitamin\Commands\Note\AddNoteCommand;
use Gitamin\Models\Note;
use GrahamCampbell\Binput\Facades\Binput;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Database\QueryException;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
class NoteController extends AbstractApiController
{
use DispatchesJobs;
public function getNotes()
echo 'getNotes';
}
public function getNote(Note $note)
$note
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
echo 'getNote';
/**
* Create a new note.
*
* @param \Illuminate\Contracts\Auth\Guard $auth
* @return \Illuminate\Http\JsonResponse
*/
public function postNotes(Guard $auth)
$auth
try {
$note = $this->dispatch(new AddNoteCommand(
Binput::get('description'),
Binput::get('noteable_type'),
Binput::get('noteable_id'),
Binput::get('author_id'),
Binput::get('project_id')
));
} catch (QueryException $e) {
throw new BadRequestHttpException();
return $this->item($note);
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.