Code Duplication    Length = 37-40 lines in 4 locations

src/commands/MoipReasonCommand.php 1 location

@@ 6-42 (lines=37) @@
3
use Moip;
4
use Illuminate\Console\Command;
5
6
class MoipReasonCommand extends Command {
7
8
	/**
9
	 * The console command name.
10
	 *
11
	 * @var string
12
	 */
13
	protected $name = 'moip:reason';
14
15
	/**
16
	 * The console command description.
17
	 *
18
	 * @var string
19
	 */
20
	protected $description = 'New reason sales.';
21
22
	/**
23
	 * Create a new command instance.
24
	 */
25
	public function __construct()
26
	{
27
		parent::__construct();
28
	}
29
30
	/**
31
	 * Execute the console command.
32
	 *
33
	 * @return mixed
34
	 */
35
	public function fire()
36
	{
37
		$reason = $this->ask('Motivo da venda:');
38
		$moip = Moip::first();
39
		$moip->reason = $reason;
40
		$moip->save();
41
	}
42
}

src/commands/MoipReceiverCommand.php 1 location

@@ 6-42 (lines=37) @@
3
use Moip;
4
use Illuminate\Console\Command;
5
6
class MoipReceiverCommand extends Command {
7
8
	/**
9
	 * The console command name.
10
	 *
11
	 * @var string
12
	 */
13
	protected $name = 'moip:receiver';
14
15
	/**
16
	 * The console command description.
17
	 *
18
	 * @var string
19
	 */
20
	protected $description = 'Setting the primary receiver.';
21
22
	/**
23
	 * Create a new command instance.
24
	 */
25
	public function __construct()
26
	{
27
		parent::__construct();
28
	}
29
30
	/**
31
	 * Execute the console command.
32
	 *
33
	 * @return mixed
34
	 */
35
	public function fire()
36
	{
37
		$receiver = $this->ask('Recebidor primario: ');
38
		$moip = Moip::first();
39
		$moip->receiver = $receiver;
40
		$moip->save();
41
	}
42
}
43

src/commands/MoipUrlNotificationCommand.php 1 location

@@ 6-44 (lines=39) @@
3
use Moip;
4
use Illuminate\Console\Command;
5
6
class MoipUrlNotificationCommand extends Command {
7
8
	/**
9
	 * The console command name.
10
	 *
11
	 * @var string
12
	 */
13
	protected $name = 'moip:urlnotification';
14
15
	/**
16
	 * The console command description.
17
	 *
18
	 * @var string
19
	 */
20
	protected $description = 'URL de envio do NASP (callback).';
21
22
	/**
23
	 * Create a new command instance.
24
	 *
25
	 * @return void
26
	 */
27
	public function __construct()
28
	{
29
		parent::__construct();
30
	}
31
32
	/**
33
	 * Execute the console command.
34
	 *
35
	 * @return mixed
36
	 */
37
	public function fire()
38
	{
39
		$url = $this->ask('URL de notificação NASP:');
40
		$moip = Moip::first();	
41
		$moip->url_notification = $url;
42
		$moip->save();
43
	}
44
}
45

src/commands/MoipUrlReturnCommand.php 1 location

@@ 6-45 (lines=40) @@
3
use Moip;
4
use Illuminate\Console\Command;
5
6
class MoipUrlReturnCommand extends Command {
7
8
	/**
9
	 * The console command name.
10
	 *
11
	 * @var string
12
	 */
13
	protected $name = 'moip:urlreturn';
14
15
	/**
16
	 * The console command description.
17
	 *
18
	 * @var string
19
	 */
20
	protected $description = 'URL que o cliente será redirecionado ao finalizar o pagamento no checkout';
21
22
	/**
23
	 * Create a new command instance.
24
	 *
25
	 * @return void
26
	 */
27
	public function __construct()
28
	{
29
		parent::__construct();
30
	}
31
32
	/**
33
	 * Execute the console command.
34
	 *
35
	 * @return mixed
36
	 */
37
	public function fire()
38
	{
39
		$url = $this->ask('URL de retorno:');
40
		$moip = Moip::first();	
41
		$moip->url_return = $url;
42
		$moip->save();
43
	}
44
45
}
46