Completed
Push — master ( 19be81...f9588c )
by Reginaldo
86:32 queued 54:18
created
app/Controller/ProdutoController.php 1 patch
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -298,8 +298,9 @@  discard block
 block discarded – undo
298 298
 
299 299
 		$retorno = $this->uploadImage($image);
300 300
 
301
-		if (!$retorno['status']) 
302
-			$this->Session->setFlash('Não foi possivel salvar a imagem tente novamente');
301
+		if (!$retorno['status']) {
302
+					$this->Session->setFlash('Não foi possivel salvar a imagem tente novamente');
303
+		}
303 304
 
304 305
 		$dados['imagem'] = $retorno['nome'];
305 306
 		$dados['id_usuario'] = $this->instancia;
@@ -378,8 +379,9 @@  discard block
 block discarded – undo
378 379
 		if (!empty($image['name'])) {
379 380
 			$retorno = $this->uploadImage($image);
380 381
 			
381
-			if (!$retorno['status']) 
382
-				$this->Session->setFlash('Não foi possivel salvar a imagem tente novamente');
382
+			if (!$retorno['status']) {
383
+							$this->Session->setFlash('Não foi possivel salvar a imagem tente novamente');
384
+			}
383 385
 			
384 386
 			$dados['imagem'] = $retorno['nome'];
385 387
 		}
@@ -470,8 +472,9 @@  discard block
 block discarded – undo
470 472
 
471 473
 		$user_active = $this->getUserActive($produto['Produto']['id_usuario']);
472 474
 
473
-		if ($user_active[0]['Usuario']['sale_without_stock'])
474
-			return true;
475
+		if ($user_active[0]['Usuario']['sale_without_stock']) {
476
+					return true;
477
+		}
475 478
 
476 479
 		if (empty($produto) && !isset($produto)) {
477 480
 			return false;
@@ -505,8 +508,9 @@  discard block
 block discarded – undo
505 508
 		
506 509
 		$returnUpload = move_uploaded_file($image['tmp_name'], $dir . $nameImage);
507 510
 
508
-		if (!$returnUpload)
509
-			return array('nome' => null, 'status' => false);
511
+		if (!$returnUpload) {
512
+					return array('nome' => null, 'status' => false);
513
+		}
510 514
 
511 515
 		return array('nome' => $nameImage, 'status' => true);
512 516
 	}
@@ -602,8 +606,7 @@  discard block
 block discarded – undo
602 606
         {
603 607
 			$this->Session->setFlash("O arquivo está na fila para ser importado, iremos enviar um e-mail quando terminar.");
604 608
 			$this->redirect("/produto/listar_cadastros");  
605
-        }
606
-        else 
609
+        } else 
607 610
         {
608 611
 			$this->Session->setFlash("Ocorreu um erro, tente novamente.");
609 612
 			$this->redirect("/produto/listar_cadastros");          	
Please login to merge, or discard this patch.