Completed
Push — master ( 9614ea...2675c0 )
by Filippo
05:35 queued 02:49
created
src/EoC/CLI/Command/AbstractCommand.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
     elseif ($this->isFormatted($arg))
129 129
       return $arg;
130 130
     else
131
-      return (string)$arg ;
131
+      return (string)$arg;
132 132
   }
133 133
 
134 134
 
Please login to merge, or discard this patch.
Braces   +29 added lines, -26 removed lines patch added patch discarded remove patch
@@ -39,10 +39,11 @@  discard block
 block discarded – undo
39 39
    * @return bool
40 40
    */
41 41
   protected function isArray($arg) {
42
-    if (preg_match('/\A[\[]([^\[\]]+)[\]]\z/i', $arg, $matches))
43
-      return TRUE;
44
-    else
45
-      return FALSE;
42
+    if (preg_match('/\A[\[]([^\[\]]+)[\]]\z/i', $arg, $matches)) {
43
+          return TRUE;
44
+    } else {
45
+          return FALSE;
46
+    }
46 47
   }
47 48
 
48 49
 
@@ -94,8 +95,7 @@  discard block
 block discarded – undo
94 95
       }
95 96
 
96 97
       return TRUE;
97
-    }
98
-    else {
98
+    } else {
99 99
       return FALSE;
100 100
     }
101 101
   }
@@ -117,18 +117,19 @@  discard block
 block discarded – undo
117 117
 
118 118
       $argument = [];
119 119
       foreach ($values as $value) {
120
-        if ($this->isFormatted($value))
121
-          $argument[] = $value;
122
-        else
123
-          $argument[] = (string)$value;
120
+        if ($this->isFormatted($value)) {
121
+                  $argument[] = $value;
122
+        } else {
123
+                  $argument[] = (string)$value;
124
+        }
124 125
       }
125 126
 
126 127
       return $argument;
128
+    } elseif ($this->isFormatted($arg)) {
129
+          return $arg;
130
+    } else {
131
+          return (string)$arg ;
127 132
     }
128
-    elseif ($this->isFormatted($arg))
129
-      return $arg;
130
-    else
131
-      return (string)$arg ;
132 133
   }
133 134
 
134 135
 
@@ -144,15 +145,16 @@  discard block
 block discarded – undo
144 145
       $shmSize = shmop_size($shmId);
145 146
 
146 147
       // Now lets read the memory segment.
147
-      if ($buffer = shmop_read($shmId, 0, $shmSize))
148
-        $connection = unserialize($buffer);
149
-      else
150
-        throw new \RuntimeException("You are not connected to the server.");
148
+      if ($buffer = shmop_read($shmId, 0, $shmSize)) {
149
+              $connection = unserialize($buffer);
150
+      } else {
151
+              throw new \RuntimeException("You are not connected to the server.");
152
+      }
151 153
 
152 154
       shmop_close($shmId);
155
+    } else {
156
+          throw new \RuntimeException("You are not connected to the server.");
153 157
     }
154
-    else
155
-      throw new \RuntimeException("You are not connected to the server.");
156 158
 
157 159
     return new Couch(new CurlAdapter($connection['server'], $connection['user'], $connection['password']));
158 160
   }
@@ -170,15 +172,16 @@  discard block
 block discarded – undo
170 172
       $shmSize = shmop_size($shmId);
171 173
 
172 174
       // Now lets read the memory segment.
173
-      if ($buffer = shmop_read($shmId, 0, $shmSize))
174
-        $database = $buffer;
175
-      else
176
-        throw new \RuntimeException("No database selected.");
175
+      if ($buffer = shmop_read($shmId, 0, $shmSize)) {
176
+              $database = $buffer;
177
+      } else {
178
+              throw new \RuntimeException("No database selected.");
179
+      }
177 180
 
178 181
       shmop_close($shmId);
182
+    } else {
183
+          throw new \RuntimeException("No database selected.");
179 184
     }
180
-    else
181
-      throw new \RuntimeException("No database selected.");
182 185
 
183 186
     return $database;
184 187
   }
Please login to merge, or discard this patch.