@@ -56,8 +56,7 @@ |
||
| 56 | 56 | $wander->setMaxAltitude($stats->maxAltitude); |
| 57 | 57 | $wander->setMinAltitude($stats->minAltitude); |
| 58 | 58 | $wander->setCumulativeElevationGain($stats->cumulativeElevationGain); |
| 59 | - } |
|
| 60 | - catch(Exception $e) { |
|
| 59 | + } catch(Exception $e) { |
|
| 61 | 60 | //$this->logger->debug("Couldn't set extended GPX property on wander: " . $e->getMessage()); |
| 62 | 61 | throw new Exception("Couldn't set standard GPX stats properties on wander.", 0, $e); |
| 63 | 62 | } |
@@ -98,8 +98,7 @@ discard block |
||
| 98 | 98 | if ($image->getLocation() === null || $image->getLocation() === '') { |
| 99 | 99 | $image->setLocation($exifHelper->getLocation()); |
| 100 | 100 | } |
| 101 | - } |
|
| 102 | - catch(Exception $e) { |
|
| 101 | + } catch(Exception $e) { |
|
| 103 | 102 | // We've started to rely on the information gathered here, so I think |
| 104 | 103 | // this should be a proper error now. |
| 105 | 104 | throw new Exception('Error getting image Exif information: ' . $e->getMessage(), $e->getCode(), $e); |
@@ -143,8 +142,7 @@ discard block |
||
| 143 | 142 | } |
| 144 | 143 | } |
| 145 | 144 | } |
| 146 | - } |
|
| 147 | - catch(Exception $e) { |
|
| 145 | + } catch(Exception $e) { |
|
| 148 | 146 | // We've started to rely on the information gathered here, so I think |
| 149 | 147 | // this should be a proper error now. |
| 150 | 148 | throw new Exception('Error getting image Exif information: ' . $e->getMessage(), $e->getCode(), $e); |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | $this->gpxDirectory, |
| 41 | 41 | $newFilename |
| 42 | 42 | ); |
| 43 | - } |
|
| 44 | - catch (FileException $e) { |
|
| 43 | + } catch (FileException $e) { |
|
| 45 | 44 | throw new HttpException(500, "Failed finishing GPX upload: " . $e->getMessage()); |
| 46 | 45 | } |
| 47 | 46 | return $newFilename; |
@@ -21,8 +21,9 @@ |
||
| 21 | 21 | |
| 22 | 22 | public function durationToHMS(?DateInterval $interval): string |
| 23 | 23 | { |
| 24 | - if (!isset($interval)) |
|
| 25 | - return ""; |
|
| 24 | + if (!isset($interval)) { |
|
| 25 | + return ""; |
|
| 26 | + } |
|
| 26 | 27 | |
| 27 | 28 | return $interval->format('%hh %im %ss'); |
| 28 | 29 | } |