@@ -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 | } |
@@ -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 | { |
47 | 47 | throw new Exception(sprintf('writeStream() failed for %s.', $relativePath)); |
48 | 48 | } |
49 | - } |
|
50 | - catch (\Exception $exception) |
|
49 | + } catch (\Exception $exception) |
|
51 | 50 | { |
52 | 51 | throw new Exception($exception->getMessage(), 0, $exception); |
53 | 52 | } |
@@ -58,8 +57,7 @@ discard block |
||
58 | 57 | try |
59 | 58 | { |
60 | 59 | return $this->filesystem->has($relativePath); |
61 | - } |
|
62 | - catch (\Exception $exception) |
|
60 | + } catch (\Exception $exception) |
|
63 | 61 | { |
64 | 62 | throw new Exception($exception->getMessage(), 0, $exception); |
65 | 63 | } |
@@ -77,8 +75,7 @@ discard block |
||
77 | 75 | { |
78 | 76 | throw new Exception(sprintf('unlink() failed for %s', $relativePath)); |
79 | 77 | } |
80 | - } |
|
81 | - catch (\Exception $exception) |
|
78 | + } catch (\Exception $exception) |
|
82 | 79 | { |
83 | 80 | throw new Exception($exception->getMessage(), 0, $exception); |
84 | 81 | } |
@@ -98,8 +95,7 @@ discard block |
||
98 | 95 | } |
99 | 96 | |
100 | 97 | return $stream; |
101 | - } |
|
102 | - catch (\Exception $exception) |
|
98 | + } catch (\Exception $exception) |
|
103 | 99 | { |
104 | 100 | throw new Exception($exception->getMessage(), 0, $exception); |
105 | 101 | } |
@@ -96,8 +96,7 @@ |
||
96 | 96 | |
97 | 97 | unset($this->lockDepthMap[$name]); |
98 | 98 | } |
99 | - } |
|
100 | - else |
|
99 | + } else |
|
101 | 100 | { |
102 | 101 | $this->logger->info("Requested lock release for non-hold lock '{$name}'. Doing nothing."); |
103 | 102 | } |
@@ -17,12 +17,10 @@ |
||
17 | 17 | if (!file_exists($path)) |
18 | 18 | { |
19 | 19 | throw new \InvalidArgumentException("Given path '{$path}' does not exist."); |
20 | - } |
|
21 | - elseif (!is_dir($path)) |
|
20 | + } elseif (!is_dir($path)) |
|
22 | 21 | { |
23 | 22 | throw new \InvalidArgumentException("Given path '{$path}' is not a directory."); |
24 | - } |
|
25 | - elseif (!is_readable($path)) |
|
23 | + } elseif (!is_readable($path)) |
|
26 | 24 | { |
27 | 25 | throw new \InvalidArgumentException("Given directory '{$path}' is not readable.'"); |
28 | 26 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $contexts[$algorithm] = hash_init($algorithm); |
14 | 14 | } |
15 | 15 | |
16 | -while(!feof($fileHandle)) |
|
16 | +while (!feof($fileHandle)) |
|
17 | 17 | { |
18 | 18 | $buffer = fread($fileHandle, 65536); |
19 | 19 |
@@ -17,7 +17,6 @@ |
||
17 | 17 | * |
18 | 18 | * @param Index $mergedIndex |
19 | 19 | * @param Index $localIndex |
20 | - * @param Index|null $remoteIndex |
|
21 | 20 | * @return OperationList |
22 | 21 | */ |
23 | 22 | public function buildOperationList(Index $mergedIndex, Index $localIndex): OperationList; |
@@ -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 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | $started = time(); |
47 | 47 | |
48 | - while(true) |
|
48 | + while (true) |
|
49 | 49 | { |
50 | 50 | $this->logger->debug("Checking lock existence for '{$name}'..."); |
51 | 51 |