@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | class AuthComponent extends Component{ |
4 | 4 | function doComplexOperation($amount1, $amount2) { |
5 | - return $amount1 + $amount2; |
|
6 | - } |
|
5 | + return $amount1 + $amount2; |
|
6 | + } |
|
7 | 7 | } |
8 | 8 | \ No newline at end of file |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -class AuthComponent extends Component{ |
|
3 | +class AuthComponent extends Component { |
|
4 | 4 | function doComplexOperation($amount1, $amount2) { |
5 | 5 | return $amount1 + $amount2; |
6 | 6 | } |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | class ConsultaController extends AppController { |
4 | 4 | |
5 | - public function listar_cadastros(){ |
|
5 | + public function listar_cadastros() { |
|
6 | 6 | $this->loadModel('Consulta'); |
7 | 7 | $consultas = $this->Consulta->find('all', |
8 | 8 | array('conditions' => |
@@ -21,10 +21,10 @@ discard block |
||
21 | 21 | $id = $this->request->data('id'); |
22 | 22 | $this->loadModel('Consulta'); |
23 | 23 | |
24 | - $dados = array ('ativo' => '0'); |
|
25 | - $parametros = array ('id' => $id); |
|
24 | + $dados = array('ativo' => '0'); |
|
25 | + $parametros = array('id' => $id); |
|
26 | 26 | |
27 | - if ($this->Consulta->updateAll($dados,$parametros)) { |
|
27 | + if ($this->Consulta->updateAll($dados, $parametros)) { |
|
28 | 28 | echo json_encode(true); |
29 | 29 | } else { |
30 | 30 | echo json_encode(false); |
@@ -31,10 +31,10 @@ discard block |
||
31 | 31 | |
32 | 32 | if ($this->Cupom->save($dados)) { |
33 | 33 | $this->Session->setFlash('Cupom criado com sucesso!'); |
34 | - return $this->redirect('/cupom/listar_cadastros'); |
|
34 | + return $this->redirect('/cupom/listar_cadastros'); |
|
35 | 35 | } else { |
36 | 36 | $this->Session->setFlash('Ocorreu algum erro ao criar o cupom!'); |
37 | - return $this->redirect('/cupom/listar_cadastros'); |
|
37 | + return $this->redirect('/cupom/listar_cadastros'); |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
@@ -62,10 +62,10 @@ discard block |
||
62 | 62 | |
63 | 63 | if ($this->Cupom->save($dados)) { |
64 | 64 | $this->Session->setFlash('Cupom editado com sucesso!'); |
65 | - return $this->redirect('/cupom/listar_cadastros'); |
|
65 | + return $this->redirect('/cupom/listar_cadastros'); |
|
66 | 66 | } else { |
67 | 67 | $this->Session->setFlash('Ocorreu algum erro ao editar o cupom!'); |
68 | - return $this->redirect('/cupom/listar_cadastros'); |
|
68 | + return $this->redirect('/cupom/listar_cadastros'); |
|
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
@@ -77,19 +77,19 @@ discard block |
||
77 | 77 | |
78 | 78 | if ($this->Cupom->save($dados)) { |
79 | 79 | $this->Session->setFlash('Cupom excluido com sucesso!'); |
80 | - return $this->redirect('/cupom/listar_cadastros'); |
|
80 | + return $this->redirect('/cupom/listar_cadastros'); |
|
81 | 81 | } else { |
82 | 82 | $this->Session->setFlash('Ocorreu algum erro ao excluir o cupom!'); |
83 | - return $this->redirect('/cupom/listar_cadastros'); |
|
83 | + return $this->redirect('/cupom/listar_cadastros'); |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | |
87 | 87 | |
88 | 88 | /** |
89 | - * @param nome cupom |
|
90 | - * @param usuario id |
|
91 | - * @return false ou o array com os dados do cupom |
|
92 | - **/ |
|
89 | + * @param nome cupom |
|
90 | + * @param usuario id |
|
91 | + * @return false ou o array com os dados do cupom |
|
92 | + **/ |
|
93 | 93 | public function procurar_cupom($nome_cupom, $usuario_id) |
94 | 94 | { |
95 | 95 | if (empty($nome_cupom) && !isset($nome_cupom)) |
@@ -116,9 +116,9 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
119 | - * @param valor original float |
|
120 | - * @return float com o valor final ja considerando o valor do cupom |
|
121 | - **/ |
|
119 | + * @param valor original float |
|
120 | + * @return float com o valor final ja considerando o valor do cupom |
|
121 | + **/ |
|
122 | 122 | public function calcular_desconto_cupom($valor_original, $valor_desconto_cupom, $tipo_cupom) |
123 | 123 | { |
124 | 124 | if (empty($valor_original) && !isset($valor_original)) |
@@ -140,10 +140,10 @@ discard block |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
143 | - * @param $cupom String nome do cupom a ser utilizado |
|
144 | - * @param $valor float com o valor original da venda |
|
145 | - * @return $novo_valor float com o novo valor da venda |
|
146 | - **/ |
|
143 | + * @param $cupom String nome do cupom a ser utilizado |
|
144 | + * @param $valor float com o valor original da venda |
|
145 | + * @return $novo_valor float com o novo valor da venda |
|
146 | + **/ |
|
147 | 147 | public function utilizar_cupom($cupom, $valor_original, $usuario_id) |
148 | 148 | { |
149 | 149 | if (empty($cupom) && !isset($cupom)) |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | **/ |
93 | 93 | public function procurar_cupom($nome_cupom, $usuario_id) |
94 | 94 | { |
95 | - if (empty($nome_cupom) && !isset($nome_cupom)) |
|
95 | + if (empty($nome_cupom) && ! isset($nome_cupom)) |
|
96 | 96 | { |
97 | 97 | return false; |
98 | 98 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | **/ |
122 | 122 | public function calcular_desconto_cupom($valor_original, $valor_desconto_cupom, $tipo_cupom) |
123 | 123 | { |
124 | - if (empty($valor_original) && !isset($valor_original)) |
|
124 | + if (empty($valor_original) && ! isset($valor_original)) |
|
125 | 125 | { |
126 | 126 | return false; |
127 | 127 | } |
@@ -146,14 +146,14 @@ discard block |
||
146 | 146 | **/ |
147 | 147 | public function utilizar_cupom($cupom, $valor_original, $usuario_id) |
148 | 148 | { |
149 | - if (empty($cupom) && !isset($cupom)) |
|
149 | + if (empty($cupom) && ! isset($cupom)) |
|
150 | 150 | { |
151 | 151 | return false; |
152 | 152 | } |
153 | 153 | |
154 | 154 | $cupom = $this->procurar_cupom($cupom, $usuario_id); |
155 | 155 | |
156 | - if (!$cupom) |
|
156 | + if ( ! $cupom) |
|
157 | 157 | { |
158 | 158 | return false; |
159 | 159 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -class DashboardController extends AppController{ |
|
3 | +class DashboardController extends AppController { |
|
4 | 4 | |
5 | 5 | function home() { |
6 | 6 | $pagamento = $this->verificar_pagamento(); |
@@ -5,46 +5,46 @@ |
||
5 | 5 | public function __construct(); |
6 | 6 | |
7 | 7 | /** |
8 | - * @return void |
|
9 | - * @param String $token |
|
10 | - **/ |
|
8 | + * @return void |
|
9 | + * @param String $token |
|
10 | + **/ |
|
11 | 11 | public function setToken($token); |
12 | 12 | |
13 | 13 | /** |
14 | - * @return void |
|
15 | - * @param String $email |
|
16 | - **/ |
|
14 | + * @return void |
|
15 | + * @param String $email |
|
16 | + **/ |
|
17 | 17 | public function setEmail($email); |
18 | 18 | |
19 | 19 | /** |
20 | - * @return String $token |
|
21 | - **/ |
|
20 | + * @return String $token |
|
21 | + **/ |
|
22 | 22 | public function getToken(); |
23 | 23 | |
24 | 24 | /** |
25 | - * @return String $email |
|
26 | - **/ |
|
25 | + * @return String $email |
|
26 | + **/ |
|
27 | 27 | public function getEmail(); |
28 | 28 | |
29 | 29 | /** |
30 | - * @return void |
|
31 | - * @param Array $produtos |
|
32 | - **/ |
|
30 | + * @return void |
|
31 | + * @param Array $produtos |
|
32 | + **/ |
|
33 | 33 | public function setProdutos($produtos); |
34 | 34 | |
35 | 35 | /** |
36 | - * @return Array $produto |
|
37 | - **/ |
|
36 | + * @return Array $produto |
|
37 | + **/ |
|
38 | 38 | public function getProdutos(); |
39 | 39 | |
40 | 40 | /** |
41 | - * @param Array Produtos a serem adicionados |
|
42 | - **/ |
|
41 | + * @param Array Produtos a serem adicionados |
|
42 | + **/ |
|
43 | 43 | public function adicionarProdutosGateway(); |
44 | 44 | |
45 | 45 | /** |
46 | - * @param Array Andress/Endeço do cliente |
|
47 | - **/ |
|
46 | + * @param Array Andress/Endeço do cliente |
|
47 | + **/ |
|
48 | 48 | public function setEnderecoClienteGateway(); |
49 | 49 | |
50 | 50 | public function setCliente($cliente); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -interface GatewayInterface{ |
|
3 | +interface GatewayInterface { |
|
4 | 4 | |
5 | 5 | public function __construct(); |
6 | 6 |
@@ -30,10 +30,10 @@ |
||
30 | 30 | |
31 | 31 | if ($this->Hieraquia->save($dados)) { |
32 | 32 | $this->Session->setFlash('Hieraquia salva com sucesso!'); |
33 | - return $this->redirect('/hieraquia/listar_cadastros'); |
|
33 | + return $this->redirect('/hieraquia/listar_cadastros'); |
|
34 | 34 | } else { |
35 | 35 | $this->Session->setFlash('Ocorreu um erro ao salva o produto!'); |
36 | - return $this->redirect('/hieraquia/listar_cadastros'); |
|
36 | + return $this->redirect('/hieraquia/listar_cadastros'); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | empty($dados['message']) || |
26 | 26 | !filter_var($dados['email'],FILTER_VALIDATE_EMAIL)){ |
27 | 27 | $this->Session->setFlash('Você deve preencher todos os dados!'); |
28 | - return $this->redirect('/'); |
|
28 | + return $this->redirect('/'); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | $name = $dados['name']; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | mail($to,$email_subject,$email_body,$headers); |
49 | 49 | |
50 | 50 | $this->Session->setFlash('Seu e-mail foi enviado com sucesso em breve responderemos!'); |
51 | - return $this->redirect('/'); |
|
51 | + return $this->redirect('/'); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | public function sendmail() { |
@@ -1,24 +1,24 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -class HomeController extends AppController{ |
|
3 | +class HomeController extends AppController { |
|
4 | 4 | |
5 | - public function beforeFilter(){ |
|
5 | + public function beforeFilter() { |
|
6 | 6 | return true; |
7 | 7 | } |
8 | 8 | |
9 | - function index(){ |
|
9 | + function index() { |
|
10 | 10 | $this->layout = 'winners'; |
11 | 11 | } |
12 | 12 | |
13 | - function servicos(){ |
|
13 | + function servicos() { |
|
14 | 14 | $this->layout = 'winners'; |
15 | 15 | } |
16 | 16 | |
17 | - function contact(){ |
|
17 | + function contact() { |
|
18 | 18 | $this->layout = 'winners'; |
19 | 19 | } |
20 | 20 | |
21 | - function timeline(){ |
|
21 | + function timeline() { |
|
22 | 22 | $this->layout = 'winners'; |
23 | 23 | } |
24 | 24 | |
@@ -31,10 +31,10 @@ discard block |
||
31 | 31 | $dados = $this->request->data('dados'); |
32 | 32 | |
33 | 33 | // Check for empty fields |
34 | - if(empty($dados['name']) || |
|
35 | - empty($dados['email']) || |
|
36 | - empty($dados['message']) || |
|
37 | - !filter_var($dados['email'], FILTER_VALIDATE_EMAIL)) { |
|
34 | + if (empty($dados['name']) || |
|
35 | + empty($dados['email']) || |
|
36 | + empty($dados['message']) || |
|
37 | + ! filter_var($dados['email'], FILTER_VALIDATE_EMAIL)) { |
|
38 | 38 | $this->Session->setFlash('Você deve preencher todos os dados!'); |
39 | 39 | return $this->redirect('/'); |
40 | 40 | } |
@@ -49,14 +49,14 @@ discard block |
||
49 | 49 | $email_body = "Mensagem site: ".$message; |
50 | 50 | $headers = "From: [email protected]\n"; // This is the email address the generated message will be from. We recommend using something like [email protected]. |
51 | 51 | $headers .= "Reply-To: $email_address"; |
52 | - mail($to,$email_subject,$email_body,$headers); |
|
52 | + mail($to, $email_subject, $email_body, $headers); |
|
53 | 53 | //resposta automatica ao cliente |
54 | 54 | $to = $email_address; |
55 | 55 | $email_subject = '[email protected]'; |
56 | 56 | $email_body = "A sua mensagem foi recebida, em breve responderemos"; |
57 | 57 | $headers = "From: [email protected]\n"; // This is the email address the generated message will be from. We recommend using something like [email protected]. |
58 | 58 | $headers .= "Reply-To: $email_address"; |
59 | - mail($to,$email_subject,$email_body,$headers); |
|
59 | + mail($to, $email_subject, $email_body, $headers); |
|
60 | 60 | |
61 | 61 | $this->Session->setFlash('Seu e-mail foi enviado com sucesso em breve responderemos!'); |
62 | 62 | return $this->redirect('/'); |
@@ -6,7 +6,7 @@ |
||
6 | 6 | $lancamento['venda_id'] = $id_venda; |
7 | 7 | $lancamento['valor_pago'] = $valor_total; |
8 | 8 | $lancamento['data_pgt'] = date('Y-m-d'); |
9 | - $lancamento['ativo'] = 1; |
|
9 | + $lancamento['ativo'] = 1; |
|
10 | 10 | $lancamento['usuario_id'] = $this->instancia; |
11 | 11 | |
12 | 12 | $this->LancamentoVenda->save($lancamento); |
@@ -26,10 +26,10 @@ |
||
26 | 26 | |
27 | 27 | if ($this->Newsletter->save($dados)) { |
28 | 28 | $this->Session->setFlash('Cadastro de newsletter excluido com sucesso!'); |
29 | - return $this->redirect('/newsletter/listar_cadastros'); |
|
29 | + return $this->redirect('/newsletter/listar_cadastros'); |
|
30 | 30 | } else { |
31 | 31 | $this->Session->setFlash('Ocorreu algum erro ao excluir o cadastro de newsletter!'); |
32 | - return $this->redirect('/newsletter/listar_cadastros'); |
|
32 | + return $this->redirect('/newsletter/listar_cadastros'); |
|
33 | 33 | } |
34 | 34 | } |
35 | 35 |