for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SilverShop\Forms;
use SilverShop\Page\CheckoutPage;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
use SilverStripe\Forms\Form;
/**
* Base class for modifier forms.
* Provides a redirect back to the checkout page.
*
* @see OrderModifier
* @package shop
* @subpackage forms
*/
class OrderModifierForm extends Form
{
public function redirect($status = 'success', $message = '')
$message
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function redirect($status = 'success', /** @scrutinizer ignore-unused */ $message = '')
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
if (Director::is_ajax()) {
return $status; //TODO: allow for custom return types, eg json - similar to ShoppingCart::return_data()
}
Controller::curr()->redirect(CheckoutPage::find_link());
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.