@@ -41,8 +41,7 @@ |
||
41 | 41 | { |
42 | 42 | $vaultConfiguration->setConflictHandler('preferLocal'); |
43 | 43 | } |
44 | - } |
|
45 | - elseif ($preferRemote) |
|
44 | + } elseif ($preferRemote) |
|
46 | 45 | { |
47 | 46 | foreach ($configuration->getVaults() as $vaultConfiguration) |
48 | 47 | { |
@@ -200,8 +200,7 @@ |
||
200 | 200 | |
201 | 201 | $this->addVault($vaultConfig); |
202 | 202 | } |
203 | - } |
|
204 | - else |
|
203 | + } else |
|
205 | 204 | { |
206 | 205 | // using setter to prevent skipping validation |
207 | 206 | call_user_func([$this, 'set' . ucfirst($key)], $value); |
@@ -26,13 +26,11 @@ |
||
26 | 26 | { |
27 | 27 | $return[$key] = $recursiveDiff; |
28 | 28 | } |
29 | - } |
|
30 | - elseif ($value !== $array2[$key]) |
|
29 | + } elseif ($value !== $array2[$key]) |
|
31 | 30 | { |
32 | 31 | $return[$key] = $value; |
33 | 32 | } |
34 | - } |
|
35 | - else |
|
33 | + } else |
|
36 | 34 | { |
37 | 35 | $return[$key] = $value; |
38 | 36 | } |
@@ -27,8 +27,7 @@ discard block |
||
27 | 27 | { |
28 | 28 | throw new Exception(sprintf('read() failed for %s.', $relativePath)); |
29 | 29 | } |
30 | - } |
|
31 | - catch (\Exception $exception) |
|
30 | + } catch (\Exception $exception) |
|
32 | 31 | { |
33 | 32 | throw new Exception($exception->getMessage(), 0, $exception); |
34 | 33 | } |
@@ -46,8 +45,7 @@ discard block |
||
46 | 45 | { |
47 | 46 | throw new Exception(sprintf('write() failed for %s.', $relativePath)); |
48 | 47 | } |
49 | - } |
|
50 | - catch (\Exception $exception) |
|
48 | + } catch (\Exception $exception) |
|
51 | 49 | { |
52 | 50 | throw new Exception($exception->getMessage(), 0, $exception); |
53 | 51 | } |
@@ -63,8 +61,7 @@ discard block |
||
63 | 61 | { |
64 | 62 | throw new Exception(sprintf('writeStream() failed for %s.', $relativePath)); |
65 | 63 | } |
66 | - } |
|
67 | - catch (\Exception $exception) |
|
64 | + } catch (\Exception $exception) |
|
68 | 65 | { |
69 | 66 | throw new Exception($exception->getMessage(), 0, $exception); |
70 | 67 | } |
@@ -75,8 +72,7 @@ discard block |
||
75 | 72 | try |
76 | 73 | { |
77 | 74 | return $this->filesystem->has($relativePath); |
78 | - } |
|
79 | - catch (\Exception $exception) |
|
75 | + } catch (\Exception $exception) |
|
80 | 76 | { |
81 | 77 | throw new Exception($exception->getMessage(), 0, $exception); |
82 | 78 | } |
@@ -92,8 +88,7 @@ discard block |
||
92 | 88 | { |
93 | 89 | throw new Exception(sprintf('unlink() failed for %s', $relativePath)); |
94 | 90 | } |
95 | - } |
|
96 | - catch (\Exception $exception) |
|
91 | + } catch (\Exception $exception) |
|
97 | 92 | { |
98 | 93 | throw new Exception($exception->getMessage(), 0, $exception); |
99 | 94 | } |
@@ -111,8 +106,7 @@ discard block |
||
111 | 106 | } |
112 | 107 | |
113 | 108 | return $stream; |
114 | - } |
|
115 | - catch (\Exception $exception) |
|
109 | + } catch (\Exception $exception) |
|
116 | 110 | { |
117 | 111 | throw new Exception($exception->getMessage(), 0, $exception); |
118 | 112 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | |
34 | 34 | $started = time(); |
35 | 35 | |
36 | - while(true) |
|
36 | + while (true) |
|
37 | 37 | { |
38 | 38 | if (!$this->storageAdapter->exists($lockFileName)) |
39 | 39 | { |
@@ -111,8 +111,7 @@ discard block |
||
111 | 111 | } |
112 | 112 | |
113 | 113 | $table->render(); |
114 | - } |
|
115 | - else |
|
114 | + } else |
|
116 | 115 | { |
117 | 116 | $output->writeln('No synchronizations so far.'); |
118 | 117 | } |
@@ -128,8 +127,7 @@ discard block |
||
128 | 127 | if ($count = count($operationList)) |
129 | 128 | { |
130 | 129 | $output->writeln(sprintf('<bold>%d outstanding operation(s).</bold>', $count)); |
131 | - } |
|
132 | - else |
|
130 | + } else |
|
133 | 131 | { |
134 | 132 | $output->writeln('<info>Everything is up to date!</info>'); |
135 | 133 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | { |
27 | 27 | $storeman->dump( |
28 | 28 | $input->getArgument('path'), |
29 | - $input->getOption( 'revision') ? (int)$input->getOption('revision') : null, |
|
29 | + $input->getOption('revision') ? (int)$input->getOption('revision') : null, |
|
30 | 30 | $input->getOption('vault'), |
31 | 31 | new SynchronizationProgressListener($output) |
32 | 32 | ); |
@@ -45,8 +45,7 @@ |
||
45 | 45 | /** @var Configuration $configuration */ |
46 | 46 | $configuration = new $className(); |
47 | 47 | $configuration->exchangeArray($array); |
48 | - } |
|
49 | - catch (\InvalidArgumentException $exception) |
|
48 | + } catch (\InvalidArgumentException $exception) |
|
50 | 49 | { |
51 | 50 | throw new ConfigurationException('', 0, $exception); |
52 | 51 | } |