@@ -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; |
@@ -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 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | $this->consoleStyle->warning("Invalid choice"); |
47 | 47 | } |
48 | - while(true); |
|
48 | + while (true); |
|
49 | 49 | |
50 | 50 | return $return; |
51 | 51 | } |
@@ -4,7 +4,7 @@ |
||
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 | / __ |/ __/ __/ _ \/ / |/ / , _/ |
@@ -46,8 +46,7 @@ discard block |
||
46 | 46 | if ('..' === $part) |
47 | 47 | { |
48 | 48 | array_pop($absolutePathParts); |
49 | - } |
|
50 | - else |
|
49 | + } else |
|
51 | 50 | { |
52 | 51 | $absolutePathParts[] = $part; |
53 | 52 | } |
@@ -58,8 +57,7 @@ discard block |
||
58 | 57 | if (substr($path, 0, 1) === '/') |
59 | 58 | { |
60 | 59 | return '/' . $return; |
61 | - } |
|
62 | - else |
|
60 | + } else |
|
63 | 61 | { |
64 | 62 | return getcwd() . '/' . $return; |
65 | 63 | } |
@@ -87,9 +87,7 @@ |
||
87 | 87 | |
88 | 88 | // compare remote object to object state at last sync |
89 | 89 | $remoteObjectModified = !$lastLocalObject->equals($remoteObject); |
90 | - } |
|
91 | - |
|
92 | - else |
|
90 | + } else |
|
93 | 91 | { |
94 | 92 | // object already didn't exist locally at the last sync |
95 | 93 | $localObjectModified = false; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | } |
155 | 155 | |
156 | 156 | /** |
157 | - * @param Vault[] $vaults |
|
157 | + * @param \Traversable $vaults |
|
158 | 158 | * @param string $lockName |
159 | 159 | */ |
160 | 160 | protected function acquireLocks(\Traversable $vaults, string $lockName) |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
172 | - * @param Vault[] $vaults |
|
172 | + * @param \Traversable $vaults |
|
173 | 173 | * @param string $lockName |
174 | 174 | */ |
175 | 175 | protected function releaseLocks(\Traversable $vaults, string $lockName) |
@@ -183,6 +183,10 @@ discard block |
||
183 | 183 | } |
184 | 184 | } |
185 | 185 | |
186 | + /** |
|
187 | + * @param null|integer $revision |
|
188 | + * @param null|string $vaultTitle |
|
189 | + */ |
|
186 | 190 | protected function getVaultForDownload(?int $revision, ?string $vaultTitle): ?Vault |
187 | 191 | { |
188 | 192 | $revision = $revision ?: $this->getLastRevision(); |
@@ -196,8 +196,7 @@ |
||
196 | 196 | if ($vaultTitle) |
197 | 197 | { |
198 | 198 | $vault = $vaultContainer->getVaultByTitle($vaultTitle); |
199 | - } |
|
200 | - else |
|
199 | + } else |
|
201 | 200 | { |
202 | 201 | $vaults = $vaultContainer->getVaultsHavingRevision($revision); |
203 | 202 | $vault = $vaultContainer->getPrioritizedVault($vaults); |
@@ -35,12 +35,10 @@ |
||
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 | } |