Completed
Push — master ( 2f3016...5f5492 )
by Arne
01:42
created
src/Vault.php 1 patch
Braces   +4 added lines, -11 removed lines patch added patch discarded remove patch
@@ -232,8 +232,7 @@  discard block
 block discarded – undo
232 232
                 if ($localObject === null)
233 233
                 {
234 234
                     $operationCollection->addOperation(new MkdirOperation($absoluteLocalPath, $indexObject->getMode()));
235
-                }
236
-                elseif (!$localObject->isDirectory())
235
+                } elseif (!$localObject->isDirectory())
237 236
                 {
238 237
                     $operationCollection->addOperation(new MkdirOperation($absoluteLocalPath, $indexObject->getMode()));
239 238
                 }
@@ -245,9 +244,7 @@  discard block
 block discarded – undo
245 244
                         $directoryMtimes[$absoluteLocalPath] = $indexObject->getMtime();
246 245
                     }
247 246
                 }
248
-            }
249
-
250
-            elseif ($indexObject->isFile())
247
+            } elseif ($indexObject->isFile())
251 248
             {
252 249
                 // local file did not exist, hasn't been a file before or is outdated
253 250
                 if ($localObject === null || !$localObject->isFile() || $localObject->getMtime() < $indexObject->getMtime())
@@ -273,9 +270,7 @@  discard block
 block discarded – undo
273 270
 
274 271
                     $operationCollection->addOperation(new UploadOperation($absoluteLocalPath, $indexObject->getBlobId(), $this->vaultConnection));
275 272
                 }
276
-            }
277
-
278
-            elseif ($indexObject->isLink())
273
+            } elseif ($indexObject->isLink())
279 274
             {
280 275
                 $absoluteLinkTarget = dirname($absoluteLocalPath) . DIRECTORY_SEPARATOR . $indexObject->getLinkTarget();
281 276
 
@@ -284,9 +279,7 @@  discard block
 block discarded – undo
284 279
                     $operationCollection->addOperation(new UnlinkOperation($absoluteLocalPath));
285 280
                     $operationCollection->addOperation(new SymlinkOperation($absoluteLocalPath, $absoluteLinkTarget, $indexObject->getMode()));
286 281
                 }
287
-            }
288
-
289
-            else
282
+            } else
290 283
             {
291 284
                 // unknown object type
292 285
                 throw new \RuntimeException();
Please login to merge, or discard this patch.
src/IndexObject.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -161,17 +161,14 @@
 block discarded – undo
161 161
         if (is_file($absolutePath))
162 162
         {
163 163
             $object->type = static::TYPE_FILE;
164
-        }
165
-        elseif (is_dir($absolutePath))
164
+        } elseif (is_dir($absolutePath))
166 165
         {
167 166
             $object->type = static::TYPE_DIR;
168
-        }
169
-        elseif (is_link($absolutePath))
167
+        } elseif (is_link($absolutePath))
170 168
         {
171 169
             $object->type = static::TYPE_LINK;
172 170
             $object->linkTarget = str_replace($basePath, '', readlink($absolutePath));
173
-        }
174
-        else
171
+        } else
175 172
         {
176 173
             throw new \InvalidArgumentException(sprintf('File %s does not exist!', $absolutePath));
177 174
         }
Please login to merge, or discard this patch.
src/Cli/Command/InfoCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@
 block discarded – undo
26 26
         if (count($operationCollection))
27 27
         {
28 28
             $output->writeln(sprintf('<info>There are %d outstanding operations!</info>', count($operationCollection)));
29
-        }
30
-        else
29
+        } else
31 30
         {
32 31
             $output->writeln('<info>Everything is up to date!</info>');
33 32
         }
Please login to merge, or discard this patch.
src/Index.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,7 @@
 block discarded – undo
37 37
             if ($parent === null)
38 38
             {
39 39
                 throw new \InvalidArgumentException();
40
-            }
41
-            elseif (!$parent->isDirectory())
40
+            } elseif (!$parent->isDirectory())
42 41
             {
43 42
                 throw new \InvalidArgumentException();
44 43
             }
Please login to merge, or discard this patch.
src/Operation/UploadOperation.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@
 block discarded – undo
24 24
         try
25 25
         {
26 26
             $this->vaultConnection->writeStream($this->blobId, $localStream);
27
-        }
28
-        catch (\RuntimeException $exception)
27
+        } catch (\RuntimeException $exception)
29 28
         {
30 29
             return false;
31 30
         }
Please login to merge, or discard this patch.
src/IndexMerger/StandardIndexMerger.php 1 patch
Braces   +4 added lines, -10 removed lines patch added patch discarded remove patch
@@ -25,27 +25,21 @@
 block discarded – undo
25 25
                 if ($localObjectModified)
26 26
                 {
27 27
                     $mergedIndex->addObject($localObject);
28
-                }
29
-                elseif ($remoteIndex === null)
28
+                } elseif ($remoteIndex === null)
30 29
                 {
31 30
                     $mergedIndex->addObject($localObject);
32 31
                 }
33
-            }
34
-            else
32
+            } else
35 33
             {
36 34
                 $remoteObjectModified = $lastLocalIndex ? ($remoteObject->getMtime() > $lastLocalIndex->getCreated()->getTimestamp()) : false;
37 35
 
38 36
                 if (!$localObjectModified)
39 37
                 {
40 38
                     $mergedIndex->addObject($remoteObject);
41
-                }
42
-
43
-                elseif (!$remoteObjectModified)
39
+                } elseif (!$remoteObjectModified)
44 40
                 {
45 41
                     $mergedIndex->addObject($localObject);
46
-                }
47
-
48
-                else
42
+                } else
49 43
                 {
50 44
                     throw new \RuntimeException("Collision at path {$localObject->getRelativePath()}");
51 45
                 }
Please login to merge, or discard this patch.