for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Thinktomorrow\Chief\States\Featurable;
use Illuminate\Http\Request;
class TestFeaturedAssistant
{
// define routes and their endpoints
// default AssistantController guides to the Assistant to convention method like managers:
// e.g. Route::post('pages/archive', [AssistantController, 'archive']); -> archive method is propagated to
// ArchiveAssistant@archive
public static function register($app)
$app
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public static function register(/** @scrutinizer ignore-unused */ $app)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
Route::get('testje', [static::class, 'archive']);
Thinktomorrow\Chief\States\Featurable\Route
Route
\
Route::get('testje', [AssistantController, 'archive']);
Thinktomorrow\Chief\Stat...ble\AssistantController
// fetched manager
// propagate naar assistant::archive
}
public function archive(Request $request)
$request
public function archive(/** @scrutinizer ignore-unused */ Request $request)
// Get manager
$this->model->archive();
model
Thinktomorrow\Chief\Stat...e\TestFeaturedAssistant
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.