@@ -38,8 +38,7 @@ |
||
38 | 38 | if ($parent === null) |
39 | 39 | { |
40 | 40 | throw new Exception(); |
41 | - } |
|
42 | - elseif (!$parent->isDirectory()) |
|
41 | + } elseif (!$parent->isDirectory()) |
|
43 | 42 | { |
44 | 43 | throw new Exception(); |
45 | 44 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | class Application extends \Symfony\Component\Console\Application |
6 | 6 | { |
7 | - const LOGO = <<<TXT |
|
7 | + const LOGO = <<<TXT |
|
8 | 8 | ___ __ _ ___ |
9 | 9 | / _ | ________/ / (_) __/ _ \ |
10 | 10 | / __ |/ __/ __/ _ \/ / |/ / , _/ |
@@ -89,9 +89,7 @@ |
||
89 | 89 | // compare remote object to object state at last sync |
90 | 90 | // we explicitly want to use equality instead of identity |
91 | 91 | $remoteObjectModified = !($remoteObject == $lastLocalObject); |
92 | - } |
|
93 | - |
|
94 | - else |
|
92 | + } else |
|
95 | 93 | { |
96 | 94 | // object already didn't exist locally at the last sync |
97 | 95 | $localObjectModified = false; |
@@ -106,12 +106,10 @@ discard block |
||
106 | 106 | if (is_string($token)) |
107 | 107 | { |
108 | 108 | $output .= $token; |
109 | - } |
|
110 | - elseif (in_array($token[0], [T_COMMENT, T_DOC_COMMENT])) |
|
109 | + } elseif (in_array($token[0], [T_COMMENT, T_DOC_COMMENT])) |
|
111 | 110 | { |
112 | 111 | $output .= str_repeat("\n", substr_count($token[1], "\n")); |
113 | - } |
|
114 | - elseif (T_WHITESPACE === $token[0]) |
|
112 | + } elseif (T_WHITESPACE === $token[0]) |
|
115 | 113 | { |
116 | 114 | // reduce wide spaces |
117 | 115 | $whitespace = preg_replace('{[ \t]+}', ' ', $token[1]); |
@@ -123,8 +121,7 @@ discard block |
||
123 | 121 | $whitespace = preg_replace('{\n +}', "\n", $whitespace); |
124 | 122 | |
125 | 123 | $output .= $whitespace; |
126 | - } |
|
127 | - else |
|
124 | + } else |
|
128 | 125 | { |
129 | 126 | $output .= $token[1]; |
130 | 127 | } |
@@ -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 | } |
@@ -88,8 +88,7 @@ |
||
88 | 88 | $configurationFileWriter->writeConfigurationFile($configuration, $configFilePath, $skipDefaults); |
89 | 89 | |
90 | 90 | $output->writeln("<info>Successfully written config file to {$configFilePath}</info>"); |
91 | - } |
|
92 | - else |
|
91 | + } else |
|
93 | 92 | { |
94 | 93 | $output->writeln("<comment>Aborted</comment>"); |
95 | 94 | } |
@@ -68,7 +68,7 @@ |
||
68 | 68 | } |
69 | 69 | } |
70 | 70 | } |
71 | - while($this->consoleStyle->choice('Add another vault?', ['y', 'n'], 'n') === 'y'); |
|
71 | + while ($this->consoleStyle->choice('Add another vault?', ['y', 'n'], 'n') === 'y'); |
|
72 | 72 | |
73 | 73 | |
74 | 74 | $skipDefaults = !$input->getOption('writeDefaults'); |
@@ -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 | { |
@@ -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 | } |