Completed
Push — 3.1 ( 9bc055...44afa5 )
by Gordon
19:43
created
code/LatLongField.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             'data-LonFieldName' => $this->longField,
66 66
             'data-ZoomFieldName' => $this->zoomField,
67 67
             'data-UseMapBounds' => false,
68
-       );
68
+        );
69 69
 
70 70
         Requirements::css('mappable/css/mapField.css');
71 71
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $content = '<div class="editableMapWrapper">'.$this->create_tag(
90 90
             'div',
91 91
             $attributes
92
-       ).'</div>';
92
+        ).'</div>';
93 93
 
94 94
         $this->FieldList()->push(new LiteralField('locationEditor', $content));
95 95
 
Please login to merge, or discard this patch.
code/MapAPI.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -626,7 +626,7 @@
 block discarded – undo
626 626
             $kmlJson = stripslashes(json_encode($this->kmlFiles, JSON_UNESCAPED_UNICODE));
627 627
         }
628 628
 
629
-         // Center of the GMap - text centre takes precedence
629
+            // Center of the GMap - text centre takes precedence
630 630
         $geocodeCentre = ($this->latLongCenter) ?
631 631
                             $this->latLongCenter : $this->geocoding($this->center);
632 632
 
Please login to merge, or discard this patch.
code/MapField.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Map field to point for pois langitude and longitude positioning.
4
- */
3
+     * Map field to point for pois langitude and longitude positioning.
4
+     */
5 5
 class MapField extends DatalessField
6 6
 {
7 7
     /**
8
-         * @var int The level of the <h1> to <h6> HTML tag. Default: 2
9
-         */
8
+     * @var int The level of the <h1> to <h6> HTML tag. Default: 2
9
+     */
10 10
         protected $headingLevel = 2;
11 11
     private $divId;
12 12
 
Please login to merge, or discard this patch.
code/Mappable.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Defines the interface for a mappable DataObject. Implementors of this interface
4
- * must define the following functions in order to work with the {@link GoogleMapUtil}
5
- * helper class.
6
- *
7
- * @author Uncle Cheese
8
- */
3
+     * Defines the interface for a mappable DataObject. Implementors of this interface
4
+     * must define the following functions in order to work with the {@link GoogleMapUtil}
5
+     * helper class.
6
+     *
7
+     * @author Uncle Cheese
8
+     */
9 9
 interface Mappable
10 10
 {
11 11
     /**
Please login to merge, or discard this patch.
tests/LatLongFieldTest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
             $this->fail('Creation of lat long field should have failed');
25 25
         } catch (Exception $e) {
26 26
             $expected = 'LatLongField argument 1 must be an array containing at'
27
-                      .' least two FormField objects for Lat/Long values, resp'
28
-                      .'ectively.';
27
+                        .' least two FormField objects for Lat/Long values, resp'
28
+                        .'ectively.';
29 29
             $this->assertEquals($expected, $e->getMessage());
30 30
         }
31 31
     }
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
 
119 119
         $html = $mapField->FieldHolder();
120 120
         $expected = 'data-GuidePoints="[{&quot;latitude&quot;:42,&quot;longitude&quot;:&quot;113.1&'
121
-                  .'quot;},{&quot;latitude&quot;:14.9,&quot;longitude&quot;:&quot;113.2&quot;},{&q'
122
-                  .'uot;latitude&quot;:42.3,&quot;longitude&quot;:&quot;113.4&quot;}]"';
121
+                    .'quot;},{&quot;latitude&quot;:14.9,&quot;longitude&quot;:&quot;113.2&quot;},{&q'
122
+                    .'uot;latitude&quot;:42.3,&quot;longitude&quot;:&quot;113.4&quot;}]"';
123 123
 
124 124
         $this->assertContains($expected, $html);
125 125
     }
Please login to merge, or discard this patch.
tests/MapAPITest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -304,9 +304,9 @@  discard block
 block discarded – undo
304 304
         $map = $this->getMapMultipleItems();
305 305
         $html = $map->forTemplate();
306 306
         $expected = 'data-mapmarkers=\'[{"latitude":23,"longitude":78,"html":"'
307
-                  .'MEMBER: Fred Bloggs","category":"default","icon":false},{"latitude'
308
-                  .'":-12,"longitude":42.1,"html":"MEMBER: Kane Williamson","category"'
309
-                  .':"default","icon":false}]\'';
307
+                    .'MEMBER: Fred Bloggs","category":"default","icon":false},{"latitude'
308
+                    .'":-12,"longitude":42.1,"html":"MEMBER: Kane Williamson","category"'
309
+                    .':"default","icon":false}]\'';
310 310
         $this->assertContains($expected, $html);
311 311
     }
312 312
 
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
     {
339 339
         $map = $this->getMap();
340 340
         $filepath = 'file://'.Director::baseFolder()
341
-                  .'/mappable/tests/kml/example.kml';
341
+                    .'/mappable/tests/kml/example.kml';
342 342
         $content = $map->getContent($filepath);
343 343
         $textHash = hash('ripemd160', $content);
344 344
         $fileHash = hash_file('ripemd160', $filepath);
Please login to merge, or discard this patch.
tests/MapFieldTest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
         //$headingLevel = 2, $allowHTML = false, $form = nul
8 8
         $field = new MapField('NameOfField', 'TitleOfField');
9 9
         $expected = '<div class="editableMap"><div class="middleColumn" id="Nam'
10
-                  .'eOfField" style="width:100%;height:300px;margin:5px 0px 5p'
11
-                  .'x 5px;position:relative;"></div></div>';
10
+                    .'eOfField" style="width:100%;height:300px;margin:5px 0px 5p'
11
+                    .'x 5px;position:relative;"></div></div>';
12 12
         $this->assertEquals($expected, $field->Field());
13 13
     }
14 14
 
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
         //$headingLevel = 2, $allowHTML = false, $form = nul
18 18
         $field = new MapField('NameOfField');
19 19
         $expected = '<div class="editableMap"><div class="middleColumn" id="Nam'
20
-                  .'eOfField" style="width:100%;height:300px;margin:5px 0px 5p'
21
-                  .'x 5px;position:relative;"></div></div>';
20
+                    .'eOfField" style="width:100%;height:300px;margin:5px 0px 5p'
21
+                    .'x 5px;position:relative;"></div></div>';
22 22
         $this->assertEquals($expected, $field->Field());
23 23
     }
24 24
 }
Please login to merge, or discard this patch.
tests/MappableDataTest.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
         $instance->Lon = 100.52;
100 100
         $html = $instance->StaticMap(300, 800);
101 101
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
102
-                  .'13.84%2C100.52&amp;markers=13.84%2C100.52'
103
-                  .'&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
104
-                  .'ype=roadmap" width="300" height="800" alt="User" />';
102
+                    .'13.84%2C100.52&amp;markers=13.84%2C100.52'
103
+                    .'&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
104
+                    .'ype=roadmap" width="300" height="800" alt="User" />';
105 105
         $this->assertEquals($expected, $html);
106 106
     }
107 107
 
@@ -112,16 +112,16 @@  discard block
 block discarded – undo
112 112
         $instance->Lon = 100.5005558;
113 113
         $html = $instance->StaticMap(300, 800);
114 114
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
115
-                  .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
116
-                  .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
117
-                  .'ype=roadmap" width="300" height="800" alt="User" />';
115
+                    .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
116
+                    .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
117
+                    .'ype=roadmap" width="300" height="800" alt="User" />';
118 118
         $this->assertEquals($expected, $html);
119 119
 
120 120
         $html = $instance->StaticMap(310, 810);
121 121
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
122
-                  .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
123
-                  .'558&amp;zoom=13&amp;size=310x810&amp;sensor=false&amp;mapt'
124
-                  .'ype=roadmap" width="310" height="810" alt="User" />';
122
+                    .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
123
+                    .'558&amp;zoom=13&amp;size=310x810&amp;sensor=false&amp;mapt'
124
+                    .'ype=roadmap" width="310" height="810" alt="User" />';
125 125
         $this->assertEquals($expected, $html);
126 126
     }
127 127
 
@@ -132,22 +132,22 @@  discard block
 block discarded – undo
132 132
         $instance->Lon = 100.5005558;
133 133
         $html = $instance->StaticMap(300, 800, null, 'satellite');
134 134
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
135
-                  .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
136
-                  .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
137
-                  .'ype=satellite" width="300" height="800" alt="User" />';
135
+                    .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
136
+                    .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
137
+                    .'ype=satellite" width="300" height="800" alt="User" />';
138 138
         $this->assertEquals($expected, $html);
139 139
 
140 140
         $html = $instance->StaticMap(300, 800, null, 'terrain');
141 141
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
142
-                  .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
143
-                  .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
144
-                  .'ype=terrain" width="300" height="800" alt="User" />';
142
+                    .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
143
+                    .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
144
+                    .'ype=terrain" width="300" height="800" alt="User" />';
145 145
 
146 146
         $html = $instance->StaticMap(300, 800, null, 'hybrid');
147 147
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
148
-                  .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
149
-                  .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
150
-                  .'ype=hybrid" width="300" height="800" alt="User" />';
148
+                    .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
149
+                    .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
150
+                    .'ype=hybrid" width="300" height="800" alt="User" />';
151 151
         $this->assertEquals($expected, $html);
152 152
     }
153 153
 
@@ -157,16 +157,16 @@  discard block
 block discarded – undo
157 157
 
158 158
         $html = $instance->StaticMap(300, 800, 2);
159 159
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
160
-                  .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
161
-                  .'558&amp;zoom=2&amp;size=300x800&amp;sensor=false&amp;mapt'
162
-                  .'ype=roadmap" width="300" height="800" alt="User" />';
160
+                    .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
161
+                    .'558&amp;zoom=2&amp;size=300x800&amp;sensor=false&amp;mapt'
162
+                    .'ype=roadmap" width="300" height="800" alt="User" />';
163 163
         $this->assertEquals($expected, $html);
164 164
 
165 165
         $html = $instance->StaticMap(300, 800, 12);
166 166
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
167
-                  .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
168
-                  .'558&amp;zoom=12&amp;size=300x800&amp;sensor=false&amp;mapt'
169
-                  .'ype=roadmap" width="300" height="800" alt="User" />';
167
+                    .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
168
+                    .'558&amp;zoom=12&amp;size=300x800&amp;sensor=false&amp;mapt'
169
+                    .'ype=roadmap" width="300" height="800" alt="User" />';
170 170
         $this->assertEquals($expected, $html);
171 171
     }
172 172
 
Please login to merge, or discard this patch.