for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Anomaly\UsersModule\User\Password\Command;
use Anomaly\UsersModule\User\Password\ForgotPasswordFormBuilder;
use Illuminate\Contracts\Config\Repository;
/**
* Class SetDefaultOptions
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <[email protected]>
* @author Ryan Thompson <[email protected]>
*/
class SetOptions
{
* The reset form builder.
* @var ForgotPasswordFormBuilder
protected $builder;
* Create a new SetDefaultOptions instance.
* @param ForgotPasswordFormBuilder $builder
public function __construct(ForgotPasswordFormBuilder $builder)
$this->builder = $builder;
}
* Handle the command.
* @param Repository $config
public function handle(Repository $config)
$config
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
if (!$this->builder->getOption('redirect')) {
$this->builder->setOption('redirect', '/');
if (!$this->builder->getOption('success_message')) {
$this->builder->setOption(
'success_message',
'You are now logged in.'
);
if (!$this->builder->getOption('container_class')) {
$this->builder->setOption('container_class', 'form-wrapper');
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.