Completed
Push — master ( 5a3952...8a8d0e )
by Alexander
01:24
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
@@ -74,8 +74,7 @@
 block discarded – undo
74 74
 
75 75
                     $this->documentManager->insert($collection, $document);
76 76
                     $output .= "Inserted document in the $collection collection.\n";
77
-                }
78
-                catch (Exception $exception) {
77
+                } catch (Exception $exception) {
79 78
                     $output .= "Error: ".$exception->getMessage()."\n";
80 79
                 }
81 80
                 break;
Please login to merge, or discard this patch.