@@ -58,9 +58,7 @@ discard block |
||
| 58 | 58 | $directoryMtimes[$mergedIndexObject->getRelativePath()] = $mergedIndexObject->getMtime(); |
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | - } |
|
| 62 | - |
|
| 63 | - elseif ($mergedIndexObject->isFile()) |
|
| 61 | + } elseif ($mergedIndexObject->isFile()) |
|
| 64 | 62 | { |
| 65 | 63 | // local file did not exist, hasn't been a file before or is outdated |
| 66 | 64 | $doDownloadFile = $localObject === null || !$localObject->isFile() || $localObject->getMtime() < $mergedIndexObject->getMtime(); |
@@ -76,9 +74,7 @@ discard block |
||
| 76 | 74 | |
| 77 | 75 | $modifiedPaths[] = $mergedIndexObject->getRelativePath(); |
| 78 | 76 | } |
| 79 | - } |
|
| 80 | - |
|
| 81 | - elseif ($mergedIndexObject->isLink()) |
|
| 77 | + } elseif ($mergedIndexObject->isLink()) |
|
| 82 | 78 | { |
| 83 | 79 | if ($localObject !== null && $localObject->getLinkTarget() !== $mergedIndexObject->getLinkTarget()) |
| 84 | 80 | { |
@@ -87,9 +83,7 @@ discard block |
||
| 87 | 83 | |
| 88 | 84 | $modifiedPaths[] = $mergedIndexObject->getRelativePath(); |
| 89 | 85 | } |
| 90 | - } |
|
| 91 | - |
|
| 92 | - else |
|
| 86 | + } else |
|
| 93 | 87 | { |
| 94 | 88 | // unknown/invalid object type |
| 95 | 89 | throw new Exception(); |
@@ -149,8 +149,7 @@ |
||
| 149 | 149 | public function loadRemoteIndex(int $revision = null): ?Index |
| 150 | 150 | { |
| 151 | 151 | $synchronization = $revision ? |
| 152 | - $this->getVaultLayout()->getSynchronization($revision) : |
|
| 153 | - $this->getVaultLayout()->getLastSynchronization(); |
|
| 152 | + $this->getVaultLayout()->getSynchronization($revision) : $this->getVaultLayout()->getLastSynchronization(); |
|
| 154 | 153 | |
| 155 | 154 | return $synchronization ? $synchronization->getIndex() : null; |
| 156 | 155 | } |
@@ -216,8 +216,7 @@ |
||
| 216 | 216 | { |
| 217 | 217 | $newRevision = $newRevision ?: ($lastSynchronization->getRevision() + 1); |
| 218 | 218 | $remoteIndex = $lastSynchronization->getIndex(); |
| 219 | - } |
|
| 220 | - else |
|
| 219 | + } else |
|
| 221 | 220 | { |
| 222 | 221 | $newRevision = $newRevision ?: 1; |
| 223 | 222 | $remoteIndex = null; |
@@ -236,8 +236,7 @@ |
||
| 236 | 236 | if ($vaultTitle) |
| 237 | 237 | { |
| 238 | 238 | $vault = $this->getVault($vaultTitle); |
| 239 | - } |
|
| 240 | - else |
|
| 239 | + } else |
|
| 241 | 240 | { |
| 242 | 241 | $vaults = $this->getVaultsHavingRevision($revision); |
| 243 | 242 | $vault = reset($vaults) ?: null; |
@@ -20,8 +20,7 @@ |
||
| 20 | 20 | if (is_file($absolutePath) || is_link($absolutePath)) |
| 21 | 21 | { |
| 22 | 22 | return unlink($localBasePath . $this->relativePath); |
| 23 | - } |
|
| 24 | - elseif (is_dir($absolutePath)) |
|
| 23 | + } elseif (is_dir($absolutePath)) |
|
| 25 | 24 | { |
| 26 | 25 | return rmdir($absolutePath); |
| 27 | 26 | } |
@@ -108,8 +108,7 @@ |
||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | $table->render(); |
| 111 | - } |
|
| 112 | - else |
|
| 111 | + } else |
|
| 113 | 112 | { |
| 114 | 113 | $output->writeln('No synchronizations so far.'); |
| 115 | 114 | } |