@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | class LatLongField extends FieldGroup { |
| 4 | 4 | |
| 5 | - private static $allowed_actions = array ( |
|
| 5 | + private static $allowed_actions = array( |
|
| 6 | 6 | 'geocode' |
| 7 | 7 | ); |
| 8 | 8 | |
@@ -85,10 +85,10 @@ discard block |
||
| 85 | 85 | // the item currently has no location |
| 86 | 86 | $attributes['data-useMapBounds'] = true; |
| 87 | 87 | } |
| 88 | - $content = '<div class="editableMapWrapper">' . $this->createTag( |
|
| 88 | + $content = '<div class="editableMapWrapper">'.$this->createTag( |
|
| 89 | 89 | "div", |
| 90 | 90 | $attributes |
| 91 | - ) . '</div>'; |
|
| 91 | + ).'</div>'; |
|
| 92 | 92 | |
| 93 | 93 | $this->FieldList()->push(new LiteralField('locationEditor', $content)); |
| 94 | 94 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | * @return void |
| 147 | 147 | */ |
| 148 | 148 | |
| 149 | - public function set_icon_size($iconWidth,$iconHeight) |
|
| 149 | + public function set_icon_size($iconWidth, $iconHeight) |
|
| 150 | 150 | { |
| 151 | 151 | self::$iconWidth = $iconWidth; |
| 152 | 152 | self::$iconHeight = $iconHeight; |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | * @return string |
| 209 | 209 | */ |
| 210 | 210 | public static function sanitize($content) { |
| 211 | - return addslashes(str_replace(array("\n","\r", "\t"), '' ,$content)); |
|
| 211 | + return addslashes(str_replace(array("\n", "\r", "\t"), '', $content)); |
|
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | */ |
| 224 | 224 | public static function get_map(SS_List $list, $infowindowtemplateparams) { |
| 225 | 225 | $gmap = self::instance(); |
| 226 | - if($list) { |
|
| 226 | + if ($list) { |
|
| 227 | 227 | foreach ($list as $mappable) { |
| 228 | 228 | if (self::ChooseToAddDataobject($mappable)) { |
| 229 | 229 | $gmap->addMarkerAsObject($mappable, $infowindowtemplateparams); |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | private static function ChooseToAddDataobject(DataObject $do) { |
| 245 | 245 | $isMappable = $do->is_a('Mappable'); |
| 246 | 246 | |
| 247 | - foreach($do->getExtensionInstances() as $extension) { |
|
| 247 | + foreach ($do->getExtensionInstances() as $extension) { |
|
| 248 | 248 | $isMappable = $isMappable || $extension instanceof Mappable; |
| 249 | 249 | } |
| 250 | 250 | |
@@ -252,6 +252,6 @@ discard block |
||
| 252 | 252 | ? $do->MapPinEdited |
| 253 | 253 | : true; |
| 254 | 254 | |
| 255 | - return $isMappable && $filterMapPinEdited ; |
|
| 255 | + return $isMappable && $filterMapPinEdited; |
|
| 256 | 256 | } |
| 257 | 257 | } |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | public function testFieldWithTitle() { |
| 6 | 6 | //$headingLevel = 2, $allowHTML = false, $form = nul |
| 7 | - $field = new MapField('NameOfField','TitleOfField'); |
|
| 7 | + $field = new MapField('NameOfField', 'TitleOfField'); |
|
| 8 | 8 | $expected = '<div class="editableMap"><div class="middleColumn" id="Nam' |
| 9 | 9 | . 'eOfField" style="width:100%;height:300px;margin:5px 0px 5p' |
| 10 | 10 | . 'x 5px;position:relative;"></div></div>'; |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | public function test_set_map_size() { |
| 35 | - MapUtil::set_map_size('890px','24em'); |
|
| 35 | + MapUtil::set_map_size('890px', '24em'); |
|
| 36 | 36 | $html = $this->htmlForMap(); |
| 37 | 37 | $this->assertContains(' style="width:890px; height: 24em;"', $html); |
| 38 | 38 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $member->Lon = 29.24; |
| 80 | 80 | $list = new ArrayList(); |
| 81 | 81 | $list->push($member); |
| 82 | - $map = MapUtil::get_map($list,array()); |
|
| 82 | + $map = MapUtil::get_map($list, array()); |
|
| 83 | 83 | $html = $map->forTemplate(); |
| 84 | 84 | echo $html; |
| 85 | 85 | $this->fail('No change observed in generated HTML'); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | private function htmlForMap() { |
| 90 | - $map = MapUtil::get_map(new ArrayList(),array()); |
|
| 90 | + $map = MapUtil::get_map(new ArrayList(), array()); |
|
| 91 | 91 | $html = $map->forTemplate(); |
| 92 | 92 | return $html; |
| 93 | 93 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $this->fail('No evidence of map type changing'); |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - public function test_set_info_window_width() { |
|
| 111 | + public function test_set_info_window_width() { |
|
| 112 | 112 | $this->fail('No evidence of set info width being used'); |
| 113 | 113 | } |
| 114 | 114 | |