@@ -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 = $lastLocalIndex ? ($remoteObject->getMtime() > $lastLocalIndex->getCreated()->getTimestamp()) : false; |
| 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 | } |