@@ -100,6 +100,10 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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()}..."); |
@@ -75,12 +75,10 @@ discard block |
||
| 75 | 75 | if ($localObjectModified && $remoteObjectModified) |
| 76 | 76 | { |
| 77 | 77 | $mergedIndex->addObject($this->resolveConflict($conflictHandler, $remoteObject, $localObject, $lastLocalObject)); |
| 78 | - } |
|
| 79 | - elseif ($localObjectModified && $localObject !== null) |
|
| 78 | + } elseif ($localObjectModified && $localObject !== null) |
|
| 80 | 79 | { |
| 81 | 80 | $mergedIndex->addObject($localObject); |
| 82 | - } |
|
| 83 | - elseif ($remoteObjectModified && $remoteObject !== null) |
|
| 81 | + } elseif ($remoteObjectModified && $remoteObject !== null) |
|
| 84 | 82 | { |
| 85 | 83 | $mergedIndex->addObject($remoteObject); |
| 86 | 84 | } |
@@ -137,8 +135,7 @@ discard block |
||
| 137 | 135 | if ($lastLocalObject) |
| 138 | 136 | { |
| 139 | 137 | return !$lastLocalObject->equals($remoteObject, IndexObject::CMP_IGNORE_BLOBID | IndexObject::CMP_IGNORE_INODE); |
| 140 | - } |
|
| 141 | - else |
|
| 138 | + } else |
|
| 142 | 139 | { |
| 143 | 140 | return $remoteObject !== null; |
| 144 | 141 | } |
@@ -233,8 +233,7 @@ |
||
| 233 | 233 | "size: {$this->size}", |
| 234 | 234 | "blobId: {$blobId}", |
| 235 | 235 | ]); |
| 236 | - } |
|
| 237 | - elseif ($this->isLink()) |
|
| 236 | + } elseif ($this->isLink()) |
|
| 238 | 237 | { |
| 239 | 238 | $parts = array_merge($parts, [ |
| 240 | 239 | "target: {$this->linkTarget}", |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | |
| 46 | 46 | $started = time(); |
| 47 | 47 | |
| 48 | - while(true) |
|
| 48 | + while (true) |
|
| 49 | 49 | { |
| 50 | 50 | $this->logger->debug("Checking lock existence for '{$name}'..."); |
| 51 | 51 | |