for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Ijeffro\Laralocker\Http\Controllers;
use LearningLocker;
use Illuminate\Http\Request;
class ClientController extends Controller
{
/**
* Display a listing of the resource.
*
* @return LearningLocker
*/
public function index()
return LearningLocker::clients()->get();
}
* Display the specified resource.
* @param int $id
public function show($id)
$select = ["_id"];
return LearningLocker::client($id)->get($select);
* Store a newly created resource in storage.
* @param \Illuminate\Http\Request $request
public function save(Request $request)
$request
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function save(/** @scrutinizer ignore-unused */ Request $request)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$data = request()->all();
return LearningLocker::client()->create($data);
* Update the specified resource in storage.
public function update(Request $request, $id)
public function update(/** @scrutinizer ignore-unused */ Request $request, $id)
return LearningLocker::client($id)->update($data);
* Remove the specified resource from storage.
public function destroy($id)
return LearningLocker::client($id)->delete();
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.