for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LeKoala\MultiStepForm;
use SilverStripe\Forms\FormRequestHandler;
class MultiStepFormRequestHandler extends FormRequestHandler
{
/**
* Form model being handled
*
* @var MultiStepForm
*/
protected $form = null;
* @config
* @var array
private static $allowed_actions = [
$allowed_actions
'handleField',
'httpSubmission',
'forTemplate',
'gotoStep',
];
public function checkAccessAction($action)
if ($action === 'gotoStep') {
return true;
}
return parent::checkAccessAction($action);
* @param HTTPRequest $request
LeKoala\MultiStepForm\HTTPRequest
HTTPRequest
\
* @return HTTPResponse
LeKoala\MultiStepForm\HTTPResponse
HTTPResponse
* @throws HTTPResponse_Exception
public function gotoStep($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 gotoStep(/** @scrutinizer ignore-unused */ $request)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return $this->form->gotoStep();