@@ -16,8 +16,9 @@ |
||
| 16 | 16 | |
| 17 | 17 | public function durationToHMS(?DateInterval $interval): string |
| 18 | 18 | { |
| 19 | - if (!isset($interval)) |
|
| 20 | - return ""; |
|
| 19 | + if (!isset($interval)) { |
|
| 20 | + return ""; |
|
| 21 | + } |
|
| 21 | 22 | |
| 22 | 23 | return $interval->format('%H:%I:%S'); |
| 23 | 24 | } |
@@ -118,8 +118,7 @@ |
||
| 118 | 118 | $this->getParameter('gpx_directory'), |
| 119 | 119 | $newFilename |
| 120 | 120 | ); |
| 121 | - } |
|
| 122 | - catch (FileException $e) { |
|
| 121 | + } catch (FileException $e) { |
|
| 123 | 122 | throw new HttpException(500, "Failed finishing GPX upload: " . $e->getMessage()); |
| 124 | 123 | } |
| 125 | 124 | $wander->setGpxFilename($newFilename); |
@@ -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); |
@@ -30,8 +30,7 @@ |
||
| 30 | 30 | if ($image !== null) { |
| 31 | 31 | try { |
| 32 | 32 | $this->imageTaggingService->tagImage($image, $recogniseImage->getOverwrite()); |
| 33 | - } |
|
| 34 | - catch(\Exception $e) { |
|
| 33 | + } catch(\Exception $e) { |
|
| 35 | 34 | // Later on I might get cleverer, but for now let's just |
| 36 | 35 | // mark everything as non-retryable. |
| 37 | 36 | throw new UnrecoverableMessageHandlingException( |