Completed
Branch 3.1-WIP (656ec3)
by Gordon
02:27
created
code/MapField.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,19 +19,19 @@  discard block
 block discarded – undo
19 19
 			// legacy handling for old parameters: $title, $heading, ...
20 20
 			// instead of new handling: $name, $title, $heading, ...
21 21
 			$args = func_get_args();
22
-			if(!isset($args[1]) || is_numeric($args[1])) {
22
+			if (!isset($args[1]) || is_numeric($args[1])) {
23 23
 					$title = (isset($args[0])) ? $args[0] : null;
24 24
 					// Use "HeaderField(title)" as the default field name for a HeaderField;
25 25
 					// if it's just set to title then we risk causing accidental duplicate-field creation.
26 26
 
27 27
 					// this means i18nized fields won't be easily accessible through fieldByName()
28
-					$name = 'MapField' . $title;
28
+					$name = 'MapField'.$title;
29 29
 					$headingLevel = (isset($args[1])) ? $args[1] : null;
30 30
 					$allowHTML = (isset($args[2])) ? $args[2] : null;
31 31
 					$form = (isset($args[3])) ? $args[3] : null;
32 32
 			}
33 33
 
34
-			if($headingLevel) $this->headingLevel = $headingLevel;
34
+			if ($headingLevel) $this->headingLevel = $headingLevel;
35 35
 			$this->allowHTML = $allowHTML;
36 36
 			parent::__construct($name, $title, null, $allowHTML, $form);
37 37
 		}
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 
48 48
 				Requirements::css('mappable/css/mapField.css');
49 49
 
50
-				return '<div class="editableMap">' . $this->createTag(
50
+				return '<div class="editableMap">'.$this->createTag(
51 51
 						"div",
52 52
 						$attributes
53
-				) . '</div>';
53
+				).'</div>';
54 54
 		}
55 55
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,9 @@
 block discarded – undo
31 31
 					$form = (isset($args[3])) ? $args[3] : null;
32 32
 			}
33 33
 
34
-			if($headingLevel) $this->headingLevel = $headingLevel;
34
+			if($headingLevel) {
35
+				$this->headingLevel = $headingLevel;
36
+			}
35 37
 			$this->allowHTML = $allowHTML;
36 38
 			parent::__construct($name, $title, null, $allowHTML, $form);
37 39
 		}
Please login to merge, or discard this patch.