Completed
Push — master ( c4faf8...f2feb8 )
by Mehmet
02:09
created
apps/elastico/controllers/es/doc.delete.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@  discard block
 block discarded – undo
11 11
     $params['index'] = $index;
12 12
     $params['type'] = $type;
13 13
     $params['id'] = $id;
14
-    try{
14
+    try {
15 15
         $result = $ES->delete($params);
16 16
     }
17
-    catch (Exception $e){
17
+    catch (Exception $e) {
18 18
         /*
19 19
         If you try to delete a document with an _id that does not exist, $ES->delete throws an Exception.
20 20
         B/c of default behaviour of reformo/rslim, it bypasses all Exceptions and it returns Exception message.
@@ -24,6 +24,6 @@  discard block
 block discarded – undo
24 24
     }
25 25
     $found = ($result['found'] === true) ? 1 : 0;
26 26
     sleep(1);
27
-    header("location:" . BASE_HREF . "/" . $index . "/" . $type . "?res=success&req=delete&f=".$found);
27
+    header("location:" . BASE_HREF . "/" . $index . "/" . $type . "?res=success&req=delete&f=" . $found);
28 28
     exit;
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@
 block discarded – undo
13 13
     $params['id'] = $id;
14 14
     try{
15 15
         $result = $ES->delete($params);
16
-    }
17
-    catch (Exception $e){
16
+    } catch (Exception $e){
18 17
         /*
19 18
         If you try to delete a document with an _id that does not exist, $ES->delete throws an Exception.
20 19
         B/c of default behaviour of reformo/rslim, it bypasses all Exceptions and it returns Exception message.
Please login to merge, or discard this patch.