Completed
Push — master ( 9739a9...9a2d70 )
by Arne
02:15
created
src/Index/Index.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
41 41
             if ($parentNode === null)
42 42
             {
43 43
                 throw new Exception("Trying to add object {$indexObject->getRelativePath()} without existing parent node");
44
-            }
45
-            elseif (!$parentNode->getIndexObject()->isDirectory())
44
+            } elseif (!$parentNode->getIndexObject()->isDirectory())
46 45
             {
47 46
                 throw new Exception("Trying to add object {$indexObject->getRelativePath()} under parent node which is not a directory");
48 47
             }
Please login to merge, or discard this patch.
src/Cli/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 class Application extends \Symfony\Component\Console\Application
6 6
 {
7
-    public const LOGO =  <<<TXT
7
+    public const LOGO = <<<TXT
8 8
   ____  _                                       
9 9
  / ___|| |_ ___  _ __ ___ _ __ ___   __ _ _ __  
10 10
  \___ \| __/ _ \| '__/ _ \ '_ ` _ \ / _` | '_ \ 
Please login to merge, or discard this patch.
src/StorageAdapter/FlysystemStorageAdapter.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@  discard block
 block discarded – undo
46 46
             {
47 47
                 throw new Exception(sprintf('writeStream() failed for %s.', $relativePath));
48 48
             }
49
-        }
50
-        catch (\Exception $exception)
49
+        } catch (\Exception $exception)
51 50
         {
52 51
             throw new Exception($exception->getMessage(), 0, $exception);
53 52
         }
@@ -58,8 +57,7 @@  discard block
 block discarded – undo
58 57
         try
59 58
         {
60 59
             return $this->filesystem->has($relativePath);
61
-        }
62
-        catch (\Exception $exception)
60
+        } catch (\Exception $exception)
63 61
         {
64 62
             throw new Exception($exception->getMessage(), 0, $exception);
65 63
         }
@@ -77,8 +75,7 @@  discard block
 block discarded – undo
77 75
             {
78 76
                 throw new Exception(sprintf('unlink() failed for %s', $relativePath));
79 77
             }
80
-        }
81
-        catch (\Exception $exception)
78
+        } catch (\Exception $exception)
82 79
         {
83 80
             throw new Exception($exception->getMessage(), 0, $exception);
84 81
         }
@@ -98,8 +95,7 @@  discard block
 block discarded – undo
98 95
             }
99 96
 
100 97
             return $stream;
101
-        }
102
-        catch (\Exception $exception)
98
+        } catch (\Exception $exception)
103 99
         {
104 100
             throw new Exception($exception->getMessage(), 0, $exception);
105 101
         }
Please login to merge, or discard this patch.
src/LockAdapter/AbstractLockAdapter.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,7 @@
 block discarded – undo
96 96
 
97 97
                 unset($this->lockDepthMap[$name]);
98 98
             }
99
-        }
100
-        else
99
+        } else
101 100
         {
102 101
             $this->logger->info("Requested lock release for non-hold lock '{$name}'. Doing nothing.");
103 102
         }
Please login to merge, or discard this patch.
src/IndexBuilder/StandardIndexBuilder.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,12 +17,10 @@
 block discarded – undo
17 17
         if (!file_exists($path))
18 18
         {
19 19
             throw new \InvalidArgumentException("Given path '{$path}' does not exist.");
20
-        }
21
-        elseif (!is_dir($path))
20
+        } elseif (!is_dir($path))
22 21
         {
23 22
             throw new \InvalidArgumentException("Given path '{$path}' is not a directory.");
24
-        }
25
-        elseif (!is_readable($path))
23
+        } elseif (!is_readable($path))
26 24
         {
27 25
             throw new \InvalidArgumentException("Given directory '{$path}' is not readable.'");
28 26
         }
Please login to merge, or discard this patch.
doc/encryptionPerformanceTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     $contexts[$algorithm] = hash_init($algorithm);
14 14
 }
15 15
 
16
-while(!feof($fileHandle))
16
+while (!feof($fileHandle))
17 17
 {
18 18
     $buffer = fread($fileHandle, 65536);
19 19
 
Please login to merge, or discard this patch.
src/OperationListBuilder/OperationListBuilderInterface.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
17 17
      *
18 18
      * @param Index $mergedIndex
19 19
      * @param Index $localIndex
20
-     * @param Index|null $remoteIndex
21 20
      * @return OperationList
22 21
      */
23 22
     public function buildOperationList(Index $mergedIndex, Index $localIndex): OperationList;
Please login to merge, or discard this patch.
src/IndexMerger/StandardIndexMerger.php 2 patches
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -100,6 +100,10 @@  discard block
 block discarded – undo
100 100
         return $mergedIndex;
101 101
     }
102 102
 
103
+    /**
104
+     * @param IndexObject|null $localObject
105
+     * @param IndexObject|null $lastLocalObject
106
+     */
103 107
     protected function isLocalObjectModified(?IndexObject $localObject, ?IndexObject $lastLocalObject, int $options): bool
104 108
     {
105 109
         if (!$lastLocalObject)
@@ -132,6 +136,10 @@  discard block
 block discarded – undo
132 136
         return $localObjectModified;
133 137
     }
134 138
 
139
+    /**
140
+     * @param IndexObject|null $remoteObject
141
+     * @param IndexObject|null $lastLocalObject
142
+     */
135 143
     protected function isRemoteObjectModified(?IndexObject $remoteObject, ?IndexObject $lastLocalObject): bool
136 144
     {
137 145
         if ($lastLocalObject)
@@ -144,6 +152,10 @@  discard block
 block discarded – undo
144 152
         }
145 153
     }
146 154
 
155
+    /**
156
+     * @param IndexObject|null $localObject
157
+     * @param IndexObject|null $lastLocalObject
158
+     */
147 159
     protected function resolveConflict(ConflictHandlerInterface $conflictHandler, IndexObject $remoteObject, ?IndexObject $localObject, ?IndexObject $lastLocalObject): IndexObject
148 160
     {
149 161
         $this->logger->notice("Resolving conflict at {$remoteObject->getRelativePath()}...");
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -76,12 +76,10 @@  discard block
 block discarded – undo
76 76
             if ($localObjectModified && $remoteObjectModified)
77 77
             {
78 78
                 $mergedIndex->addObject($this->resolveConflict($conflictHandler, $remoteObject, $localObject, $lastLocalObject));
79
-            }
80
-            elseif ($localObjectModified && $localObject !== null)
79
+            } elseif ($localObjectModified && $localObject !== null)
81 80
             {
82 81
                 $mergedIndex->addObject($localObject);
83
-            }
84
-            elseif ($remoteObjectModified && $remoteObject !== null)
82
+            } elseif ($remoteObjectModified && $remoteObject !== null)
85 83
             {
86 84
                 $mergedIndex->addObject($remoteObject);
87 85
             }
@@ -146,8 +144,7 @@  discard block
 block discarded – undo
146 144
         if ($lastLocalObject)
147 145
         {
148 146
             return !$lastLocalObject->equals($remoteObject, static::CMP_OPTIONS);
149
-        }
150
-        else
147
+        } else
151 148
         {
152 149
             return $remoteObject !== null;
153 150
         }
Please login to merge, or discard this patch.
src/Index/Comparison/IndexObjectComparison.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,12 +35,10 @@
 block discarded – undo
35 35
         if ($indexObjectA instanceof IndexObject)
36 36
         {
37 37
             $this->relativePath = $indexObjectA->getRelativePath();
38
-        }
39
-        elseif ($indexObjectB instanceof IndexObject)
38
+        } elseif ($indexObjectB instanceof IndexObject)
40 39
         {
41 40
             $this->relativePath = $indexObjectB->getRelativePath();
42
-        }
43
-        else
41
+        } else
44 42
         {
45 43
             throw new \LogicException();
46 44
         }
Please login to merge, or discard this patch.