MoipCommand   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 99
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 12
Bugs 0 Features 0
Metric Value
wmc 5
c 12
b 0
f 0
lcom 1
cbo 0
dl 0
loc 99
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A fire() 0 6 1
A commands() 0 19 1
A information() 0 8 1
A logo() 0 11 1
1
<?php namespace SOSTheBlack\Moip\Commands;
2
3
use Moip;
4
use Illuminate\Console\Command;
5
6
class MoipCommand extends Command {
7
8
	/**
9
	 * The console command name.
10
	 *
11
	 * @var string
12
	 */
13
	protected $name = 'moip';
14
15
	/**
16
	 * The console command description.
17
	 *
18
	 * @var string
19
	 */
20
	protected $description = 'information on the commands';
21
22
	/**
23
	 * version od package
24
	 *
25
	 * @var string
26
	 **/
27
	private $version = '1.2.0';
28
29
	/**
30
	 * Create a new command instance.
31
	 */
32
	public function __construct()
33
	{
34
		parent::__construct();
35
	}
36
37
	/**
38
	 * Execute the console command.
39
	 *
40
	 * @return void
41
	 */
42
	public function fire()
43
	{
44
		$this->logo();
45
		$this->information();
46
		$this->commands();
47
	}
48
49
	/**
50
	 * Commands of package
51
	 * 
52
	 * @return void
53
	 */
54
	private function commands()
55
	{
56
		$this->line(' <info>moip:install</info>			Instalacao e configuracao completa.');
57
		$this->line(' <info>moip:migrate</info>			Executa as migrations.');
58
		$this->line(' <info>moip:seeds</info>			Executa os seeds.');
59
		$this->line(' <info>moip:assets</info>			Publicar assets.');
60
		$this->line(' <info>moip:config</info>			Publicar arquivo de configuracao.');
61
		$this->line(' <info>moip:auth</info>			Configuracao referente a autenticacao e amboente.');
62
		$this->line(' <info>moip:receiver</info>			Definando recebedor primario.');
63
		$this->line(' <info>moip:reason</info>			Motivo da venda.');
64
		$this->line(' <info>moip:payment</info>			Configuracao referente aos metodos de pagamentos.');
65
		$this->line(' <info>moip:billet</info>			Configuracao do boleto bancario.');
66
		$this->line(' <info>moip:creditcard</info>		Configuracao do cartao de credito.');
67
		$this->line(' <info>moip:financing</info>			Configuracao do financiamento.');
68
		$this->line(' <info>moip:debit</info>			Configuracao do debito.');
69
		$this->line(' <info>moip:debitcard</info>			Configuracao do cartao de debito.');
70
		$this->line(' <info>moip:moip:urlnotification</info>	URL de envio do NASP (callback).');
71
		$this->line(' <info>moip:moip:urlreturn</info>		URL de redirecionado ao finalizar o pagamento no checkout.');
72
	}
73
74
	/**
75
	 * information of package
76
	 * 
77
	 * @return void
78
	 */
79
	private function information()
80
	{
81
		$this->line('<info>Moip Package</info> version <comment>'.$this->version.'</comment>');
82
		$this->line('');
83
		$this->comment('Available commands:');
84
		$this->line('');
85
		$this->comment('moip');
86
	}
87
88
	/**
89
	 * logo
90
	 * 
91
	 * @return void
92
	 */
93
	private function logo()
94
	{
95
$this->line('
96
   _____ _____        __ 
97
  /  __  __   \___   /__/___
98
 /  / /  / /  / __ \___/    \
99
/  / /  / /  / /_/ /  / /_/ /
100
\_/  \_/  \_/\____/__/ .___/
101
                    /_/
102
');	
103
	}
104
}
105