Completed
Push — master ( 252365...9d5047 )
by Alexander
01:43
created
src/DocumentManager.php 1 patch
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,10 +16,13 @@
 block discarded – undo
16 16
     public function getDatabasePath()
17 17
     {
18 18
         try {
19
-            if (!array_key_exists('database', $this->config)) throw new Exception('The config has no entry with key "database".');
20
-            if (!array_key_exists('path', $this->config['database'])) throw new Exception('The config has no entry with key "database/path".');
21
-        }
22
-        catch (Exception $exception) {
19
+            if (!array_key_exists('database', $this->config)) {
20
+                throw new Exception('The config has no entry with key "database".');
21
+            }
22
+            if (!array_key_exists('path', $this->config['database'])) {
23
+                throw new Exception('The config has no entry with key "database/path".');
24
+            }
25
+        } catch (Exception $exception) {
23 26
             throw new Exception('Missing config: '.$exception->getMessage());
24 27
         }
25 28
 
Please login to merge, or discard this patch.
src/Client/Parser/Parser.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,7 @@
 block discarded – undo
70 70
                     }
71 71
                     $this->documentManager->insert($collection, $document);
72 72
                     $output .= "Inserted document in the $collection collection.\n";
73
-                }
74
-                catch (Exception $exception) {
73
+                } catch (Exception $exception) {
75 74
                     $output .= "Error: ".$exception->getMessage()."\n";
76 75
                 }
77 76
                 break;
Please login to merge, or discard this patch.