Completed
Push — 3.1 ( 9bc055...44afa5 )
by Gordon
19:43
created
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.
code/shortcodes/GoogleMapShortCodeHandler.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
         // the id of the dom element to be used to render the street view
54 54
         $arguments['DomID'] = 'google_streetview_'.self::$gsv_ctr;
55 55
 
56
-        // incrememt the counter to ensure a unique id for each map canvas
57
-        ++self::$gsv_ctr;
56
+        // incrememt the counter to ensure a unique id for each map canvas++self::$gsv_ctr;
58 57
 
59 58
         // merge defaults and arguments
60 59
         $customised = array_merge($defaults, $arguments);
Please login to merge, or discard this patch.