@@ -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 | } |
@@ -85,8 +85,7 @@ |
||
| 85 | 85 | $wander->setMaxAltitude($stats->maxAltitude); |
| 86 | 86 | $wander->setMinAltitude($stats->minAltitude); |
| 87 | 87 | $wander->setCumulativeElevationGain($stats->cumulativeElevationGain); |
| 88 | - } |
|
| 89 | - catch (Exception $e) { |
|
| 88 | + } catch (Exception $e) { |
|
| 90 | 89 | //$this->logger->debug("Couldn't set extended GPX property on wander: " . $e->getMessage()); |
| 91 | 90 | throw new Exception("Couldn't set standard GPX stats properties on wander.", 0, $e); |
| 92 | 91 | } |
@@ -205,8 +205,7 @@ |
||
| 205 | 205 | // Improbable dates could cause problems if used in DB queries. |
| 206 | 206 | $result = null; |
| 207 | 207 | } |
| 208 | - } |
|
| 209 | - catch(Exception $e) { |
|
| 208 | + } catch(Exception $e) { |
|
| 210 | 209 | // I don't care what happened personally; we'll just not bother |
| 211 | 210 | // overriding our existing dates. However, whatever called us |
| 212 | 211 | // might want to log this, as someone may be probing the app for |
@@ -66,8 +66,7 @@ |
||
| 66 | 66 | $filterData->overrideRatingFromUrlParam($request->query->getInt('rating', -1)); |
| 67 | 67 | $filterData->overrideStartDateFromUrlParam((string) $request->query->get('periodStartDate')); |
| 68 | 68 | $filterData->overrideEndDateFromUrlParam((string) $request->query->get('periodEndDate')); |
| 69 | - } |
|
| 70 | - catch (Exception $e) { |
|
| 69 | + } catch (Exception $e) { |
|
| 71 | 70 | // Someone may be trying to fiddle with our URL parameters. Don't fail; the override |
| 72 | 71 | // functions are sensible enough to ignore invalid inputs. But we should log. |
| 73 | 72 | $logger->error( |