Passed
Branch WebpackEncore (4ec41a)
by Matt
06:04
created
public/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
 use Symfony\Component\ErrorHandler\Debug;
6 6
 use Symfony\Component\HttpFoundation\Request;
7 7
 
8
-require dirname(__DIR__).'/vendor/autoload.php';
8
+require dirname(__DIR__) . '/vendor/autoload.php';
9 9
 
10
-(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
10
+(new Dotenv())->bootEnv(dirname(__DIR__) . '/.env');
11 11
 
12 12
 if ($_SERVER['APP_DEBUG']) {
13 13
     umask(0000);
Please login to merge, or discard this patch.
src/Twig/SrcsetRuntime.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $this->imagineCacheManager = $imagineCacheManager;
27 27
 
28 28
         $this->filters = [];
29
-        foreach($filterManager->getFilterConfiguration()->all() as $name => $filter) {
29
+        foreach ($filterManager->getFilterConfiguration()->all() as $name => $filter) {
30 30
             if (preg_match('/^srcset/', $name)) {
31 31
                 $width = $filter['filters']['relative_resize']['widen'];
32 32
                 $this->filters[] = [
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     {
42 42
         $image_asset_path = $this->uploaderHelper->asset($image);
43 43
         $srcset = [];
44
-        foreach($this->filters as $filter) {
44
+        foreach ($this->filters as $filter) {
45 45
             $srcset[] = [
46 46
                 'width' => $filter['width'],
47 47
                 'path' => $this->imagineCacheManager->getBrowserPath($image_asset_path, $filter['filter'])
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         // Add original image as srcset option, otherwise it may never be used.
52 52
         $srcset[] = ['width' => $image->getDimensions()[0], 'path' => $image_asset_path];
53 53
 
54
-        $srcsetString = implode(', ', array_map(function ($src) {
54
+        $srcsetString = implode(', ', array_map(function($src) {
55 55
             return sprintf(
56 56
                 '%s %uw',
57 57
                 $src['path'],
Please login to merge, or discard this patch.
src/Controller/Admin/WanderController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $response = new Response();
87 87
         $format = $request->getRequestFormat();
88 88
         return $this->render(
89
-            'admin/wander/backlog.'.$format.'.twig',
89
+            'admin/wander/backlog.' . $format . '.twig',
90 90
             [
91 91
                 'wanders' => $wanders
92 92
             ],
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
      */
180 180
     public function delete(Request $request, Wander $wander): Response
181 181
     {
182
-        if ($this->isCsrfTokenValid('delete'.$wander->getId(), $request->request->get('_token'))) {
182
+        if ($this->isCsrfTokenValid('delete' . $wander->getId(), $request->request->get('_token'))) {
183 183
             $entityManager = $this->getDoctrine()->getManager();
184 184
             $entityManager->remove($wander);
185 185
             $entityManager->flush();
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
      */
194 194
     public function deleteImages(Request $request, Wander $wander): Response
195 195
     {
196
-        if ($this->isCsrfTokenValid('delete_images'.$wander->getId(), $request->request->get('_token'))) {
196
+        if ($this->isCsrfTokenValid('delete_images' . $wander->getId(), $request->request->get('_token'))) {
197 197
             $entityManager = $this->getDoctrine()->getManager();
198 198
             $images = $wander->getImages();
199 199
             foreach ($images as $image) {
Please login to merge, or discard this patch.
src/Form/WanderType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
                         new File([
39 39
                             'maxSize' => '1024k',
40 40
                             'mimeTypes' => [
41
-                                "application/gpx+xml","text/xml","application/xml","application/octet-stream"
41
+                                "application/gpx+xml", "text/xml", "application/xml", "application/octet-stream"
42 42
                             ],
43 43
                             'mimeTypesMessage' =>'Please upload a valid GPX document'
44 44
                         ])
Please login to merge, or discard this patch.
config/preload.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
4
-    require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
3
+if (file_exists(dirname(__DIR__) . '/var/cache/prod/App_KernelProdContainer.preload.php')) {
4
+    require dirname(__DIR__) . '/var/cache/prod/App_KernelProdContainer.preload.php';
5 5
 }
Please login to merge, or discard this patch.
src/Service/GpxService.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
                 $wander->setMinAltitude($stats->minAltitude);
81 81
                 $wander->setCumulativeElevationGain($stats->cumulativeElevationGain);
82 82
             }
83
-            catch(Exception $e) {
83
+            catch (Exception $e) {
84 84
                 //$this->logger->debug("Couldn't set extended GPX property on wander: " . $e->getMessage());
85 85
                 throw new Exception("Couldn't set standard GPX stats properties on wander.", 0, $e);
86 86
             }
@@ -111,10 +111,10 @@  discard block
 block discarded – undo
111 111
     public function compass(float $x, float $y): float
112 112
     {
113 113
         // https://www.php.net/manual/en/function.atan2.php#88119
114
-        if($x==0 AND $y==0){ return 0; } // ...or return 360
114
+        if ($x == 0 AND $y == 0) { return 0; } // ...or return 360
115 115
         return ($x < 0)
116
-            ? rad2deg(atan2($x,$y)) + 360
117
-            : rad2deg(atan2($x,$y));
116
+            ? rad2deg(atan2($x, $y)) + 360
117
+            : rad2deg(atan2($x, $y));
118 118
     }
119 119
 
120 120
     public function gpxToGeoJson(string $gpx, float $epsilon, int $precision): string
Please login to merge, or discard this patch.
src/Controller/Search/SearchController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 
40 40
         // TODO: Maybe try combining results from $imageFinder and $wanderFinder?
41 41
 
42
-        $form = $this->createFormBuilder(null, ['method' => 'GET' ])
42
+        $form = $this->createFormBuilder(null, ['method' => 'GET'])
43 43
             ->add('query', SearchType::class, ['label' => false])
44 44
             ->getForm();
45 45
 
Please login to merge, or discard this patch.
src/Service/ImaggaService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
         }
99 99
 
100 100
         $tags = [];
101
-        foreach($imagga_result->result->tags as $tag) {
101
+        foreach ($imagga_result->result->tags as $tag) {
102 102
             $tags[] = $tag->tag->en;
103 103
         }
104 104
         $image->setAutoTags($tags);
Please login to merge, or discard this patch.
src/Service/ImageService.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                 $image->setLocation($exifHelper->getLocation());
100 100
             }
101 101
         }
102
-        catch(Exception $e) {
102
+        catch (Exception $e) {
103 103
             // We've started to rely on the information gathered here, so I think
104 104
             // this should be a proper error now.
105 105
             throw new Exception('Error getting image Exif information: ' . $e->getMessage(), $e->getCode(), $e);
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                 }
145 145
             }
146 146
         }
147
-        catch(Exception $e) {
147
+        catch (Exception $e) {
148 148
             // We've started to rely on the information gathered here, so I think
149 149
             // this should be a proper error now.
150 150
             throw new Exception('Error getting image Exif information: ' . $e->getMessage(), $e->getCode(), $e);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -98,8 +98,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.