Completed
Push — master ( 8a8d0e...2521da )
by Alexander
02:11
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.
src/Collection/Collection.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -168,6 +168,9 @@
 block discarded – undo
168 168
 
169 169
 
170 170
 
171
+    /**
172
+     * @param resource $file
173
+     */
171 174
     private function aquireReadLock($file)
172 175
     {
173 176
         $lockAquired = flock($file, LOCK_SH | LOCK_NB);
Please login to merge, or discard this patch.