@@ -114,8 +114,7 @@ |
||
| 114 | 114 | try |
| 115 | 115 | { |
| 116 | 116 | @fclose($this->getStream($relativePath, 'r')); |
| 117 | - } |
|
| 118 | - catch (\RuntimeException $exception) |
|
| 117 | + } catch (\RuntimeException $exception) |
|
| 119 | 118 | { |
| 120 | 119 | return false; |
| 121 | 120 | } |
@@ -49,8 +49,7 @@ |
||
| 49 | 49 | $factory = new JsonFileConfigurationFactory($path); |
| 50 | 50 | |
| 51 | 51 | return $factory(); |
| 52 | - } |
|
| 53 | - else |
|
| 52 | + } else |
|
| 54 | 53 | { |
| 55 | 54 | throw new \InvalidArgumentException(sprintf('Don\'t know how to handle configuration given file %s.', $path)); |
| 56 | 55 | } |
@@ -25,27 +25,21 @@ |
||
| 25 | 25 | if ($localObjectModified) |
| 26 | 26 | { |
| 27 | 27 | $mergedIndex->addObject($localObject); |
| 28 | - } |
|
| 29 | - elseif ($remoteIndex === null) |
|
| 28 | + } elseif ($remoteIndex === null) |
|
| 30 | 29 | { |
| 31 | 30 | $mergedIndex->addObject($localObject); |
| 32 | 31 | } |
| 33 | - } |
|
| 34 | - else |
|
| 32 | + } else |
|
| 35 | 33 | { |
| 36 | 34 | $remoteObjectModified = $remoteObject->getMtime() > $lastLocalIndex->getCreated()->getTimestamp(); |
| 37 | 35 | |
| 38 | 36 | if (!$localObjectModified) |
| 39 | 37 | { |
| 40 | 38 | $mergedIndex->addObject($remoteObject); |
| 41 | - } |
|
| 42 | - |
|
| 43 | - elseif (!$remoteObjectModified) |
|
| 39 | + } elseif (!$remoteObjectModified) |
|
| 44 | 40 | { |
| 45 | 41 | $mergedIndex->addObject($localObject); |
| 46 | - } |
|
| 47 | - |
|
| 48 | - else |
|
| 42 | + } else |
|
| 49 | 43 | { |
| 50 | 44 | throw new \RuntimeException("Collision at path {$localObject->getRelativePath()}"); |
| 51 | 45 | } |