Completed
Branch AUTOMATED_TESTING (6eabf7)
by Gordon
14:03
created
code/MapUtil.php 1 patch
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
 	 */
24 24
 	public static $map_height = '400px';
25 25
 
26
-    /** @var int Icon width of the gmarker **/
27
-    public static $iconWidth = 24;
26
+	/** @var int Icon width of the gmarker **/
27
+	public static $iconWidth = 24;
28 28
 
29
-    /** @var int Icon height of the gmarker **/
30
-    public static $iconHeight = 24;
29
+	/** @var int Icon height of the gmarker **/
30
+	public static $iconHeight = 24;
31 31
 
32 32
 	/**
33 33
 	 * @var int Prefix for the div ID of the map
@@ -99,59 +99,59 @@  discard block
 block discarded – undo
99 99
 		self::$map_height = $height;
100 100
 	}
101 101
 
102
-    /**
103
-     * FIXME - NOT USED?
104
-      * Set the type of the gmap
105
-      *
106
-      * @param string $mapType (can be 'google.maps.MapTypeId.ROADMAP', 'G_SATELLITE_MAP',
107
-      * 'G_HYBRID_MAP', 'G_PHYSICAL_MAP')
108
-      *
109
-      * @return void
110
-      */
111
-    public static function set_map_type($mapType) {
112
-        self::$map_type = $mapType;
113
-    }
114
-
115
-    /**
116
-     * FIXME - NOT USED?
117
-      * Set the with of the gmap infowindow (on marker clik)
118
-      *
119
-      * @param int $info_window_width GoogleMap info window width
120
-      *
121
-      * @return void
122
-      */
123
-    public static function set_info_window_width($info_window_width)
124
-    {
125
-        self::$info_window_width = $info_window_width;
126
-    }
127
-
128
-    /**
129
-     * FIXME - NOT USED?
130
-      * Set the center of the gmap (an address)
131
-      *
132
-      * @param string $center GoogleMap  center (an address)
133
-      *
134
-      * @return void
135
-      */
136
-    public static function set_center($center)
137
-    {
138
-        self::$center = $center;
139
-    }
140
-
141
-    /**
142
-      * Set the size of the icon markers
143
-      *
144
-      * @param int $iconWidth GoogleMap  marker icon width
145
-      * @param int $iconHeight GoogleMap  marker icon height
146
-      *
147
-      * @return void
148
-      */
149
-
150
-    public function set_icon_size($iconWidth,$iconHeight)
151
-    {
152
-        self::$iconWidth = $iconWidth;
153
-        self::$iconHeight = $iconHeight;
154
-    }
102
+	/**
103
+	 * FIXME - NOT USED?
104
+	 * Set the type of the gmap
105
+	 *
106
+	 * @param string $mapType (can be 'google.maps.MapTypeId.ROADMAP', 'G_SATELLITE_MAP',
107
+	 * 'G_HYBRID_MAP', 'G_PHYSICAL_MAP')
108
+	 *
109
+	 * @return void
110
+	 */
111
+	public static function set_map_type($mapType) {
112
+		self::$map_type = $mapType;
113
+	}
114
+
115
+	/**
116
+	 * FIXME - NOT USED?
117
+	 * Set the with of the gmap infowindow (on marker clik)
118
+	 *
119
+	 * @param int $info_window_width GoogleMap info window width
120
+	 *
121
+	 * @return void
122
+	 */
123
+	public static function set_info_window_width($info_window_width)
124
+	{
125
+		self::$info_window_width = $info_window_width;
126
+	}
127
+
128
+	/**
129
+	 * FIXME - NOT USED?
130
+	 * Set the center of the gmap (an address)
131
+	 *
132
+	 * @param string $center GoogleMap  center (an address)
133
+	 *
134
+	 * @return void
135
+	 */
136
+	public static function set_center($center)
137
+	{
138
+		self::$center = $center;
139
+	}
140
+
141
+	/**
142
+	 * Set the size of the icon markers
143
+	 *
144
+	 * @param int $iconWidth GoogleMap  marker icon width
145
+	 * @param int $iconHeight GoogleMap  marker icon height
146
+	 *
147
+	 * @return void
148
+	 */
149
+
150
+	public function set_icon_size($iconWidth,$iconHeight)
151
+	{
152
+		self::$iconWidth = $iconWidth;
153
+		self::$iconHeight = $iconHeight;
154
+	}
155 155
 
156 156
 	/**
157 157
 	 * Get a new GoogleMapAPI object and load it with the default settings
@@ -193,11 +193,11 @@  discard block
 block discarded – undo
193 193
 		$gmap->setDisplayDirectionFields(self::$direction_fields);
194 194
 		$gmap->setSize(self::$map_width, self::$map_height);
195 195
 		$gmap->setDefaultHideMarker(self::$hide_marker);
196
-        $gmap->setMapType(self::$map_type);
197
-        $gmap->setCenter(self::$center);
198
-        $gmap->setIconSize(self::$iconWidth, self::$iconHeight);
199
-        $gmap->setIncludeDownloadJavascript(self::$map_already_rendered);
200
-        $gmap->setAllowFullScreen(self::$allow_full_screen);
196
+		$gmap->setMapType(self::$map_type);
197
+		$gmap->setCenter(self::$center);
198
+		$gmap->setIconSize(self::$iconWidth, self::$iconHeight);
199
+		$gmap->setIncludeDownloadJavascript(self::$map_already_rendered);
200
+		$gmap->setAllowFullScreen(self::$allow_full_screen);
201 201
 		return $gmap;
202 202
 	}
203 203
 
Please login to merge, or discard this patch.
tests/MapUtilTest.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	}
25 25
 
26 26
 	public function test_set_map_size() {
27
-    	MapUtil::set_map_size('890px','24em');
27
+		MapUtil::set_map_size('890px','24em');
28 28
 		$html = $this->htmlForMap();
29 29
 		$this->assertContains(' style="width:890px; height: 24em;"', $html);
30 30
 	}
@@ -79,25 +79,25 @@  discard block
 block discarded – undo
79 79
 
80 80
 	// These appear to test code that's not used
81 81
 	public function test_set_center() {
82
-    	MapUtil::set_center('Bangkok, Thailand');
82
+		MapUtil::set_center('Bangkok, Thailand');
83 83
 		$html = $this->htmlForMap();
84 84
 		echo $html;
85 85
 		$this->fail('No evidence of map type changing');
86
-    }
86
+	}
87 87
 
88
-     public function test_set_map_type() {
89
-    	MapUtil::set_map_type('google.maps.MapTypeId.G_PHYSICAL_MAP');
88
+	 public function test_set_map_type() {
89
+		MapUtil::set_map_type('google.maps.MapTypeId.G_PHYSICAL_MAP');
90 90
 		$html = $this->htmlForMap();
91 91
 		echo $html;
92 92
 		$this->fail('No evidence of map type changing');
93
-    }
93
+	}
94 94
 
95
-     public function test_set_info_window_width()  {
96
-     	$this->fail('No evidence of set info width being used');
97
-    }
95
+	 public function test_set_info_window_width()  {
96
+	 	$this->fail('No evidence of set info width being used');
97
+	}
98 98
 
99
-     public function test_set_icon_size() {
99
+	 public function test_set_icon_size() {
100 100
 
101
-    }
101
+	}
102 102
 
103 103
 }
Please login to merge, or discard this patch.