@@ -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 | } |
@@ -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 | } |
@@ -41,8 +41,7 @@ |
||
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 | } |
@@ -168,17 +168,14 @@ |
||
168 | 168 | { |
169 | 169 | $object->type = static::TYPE_LINK; |
170 | 170 | $object->linkTarget = str_replace($basePath, '', readlink($absolutePath)); |
171 | - } |
|
172 | - elseif (is_file($absolutePath)) |
|
171 | + } elseif (is_file($absolutePath)) |
|
173 | 172 | { |
174 | 173 | $object->type = static::TYPE_FILE; |
175 | 174 | $object->size = (int)$stat['size']; |
176 | - } |
|
177 | - elseif (is_dir($absolutePath)) |
|
175 | + } elseif (is_dir($absolutePath)) |
|
178 | 176 | { |
179 | 177 | $object->type = static::TYPE_DIR; |
180 | - } |
|
181 | - else |
|
178 | + } else |
|
182 | 179 | { |
183 | 180 | throw new \LogicException(); |
184 | 181 | } |
@@ -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 | \___ \| __/ _ \| '__/ _ \ '_ ` _ \ / _` | '_ \ |