Completed
Push — 1.1 ( bcc01b...530a78 )
by Daniel
02:17 queued 57s
created
code/GoogleMapField.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -98,6 +98,9 @@
 block discarded – undo
98 98
 		return $this->data->$fieldNames['lng'];
99 99
 	}
100 100
 
101
+	/**
102
+	 * @param string $name
103
+	 */
101 104
 	public function getOption($name) {
102 105
 		// Quicker execution path for "."-free names
103 106
 		if (strpos($name, '.') === false) {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 	}
47 47
 
48 48
 	public function Field($properties = array()) {
49
-		Requirements::javascript(GOOGLEMAPFIELD_BASE .'/javascript/GoogleMapField.js');
49
+		Requirements::javascript(GOOGLEMAPFIELD_BASE . '/javascript/GoogleMapField.js');
50 50
 		Requirements::javascript('//google.com/maps/api/js?sensor=false&callback=googlemapfieldInit');
51
-		Requirements::css(GOOGLEMAPFIELD_BASE .'/css/GoogleMapField.css');
51
+		Requirements::css(GOOGLEMAPFIELD_BASE . '/css/GoogleMapField.css');
52 52
 		$jsOptions = array(
53 53
 			'coords' => array($this->getLatData(), $this->getLngData()),
54 54
 			'map' => array(
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
 
108 108
 			$var = $this->options;
109 109
 
110
-			foreach($names as $n) {
111
-				if(!isset($var[$n])) {
110
+			foreach ($names as $n) {
111
+				if (!isset($var[$n])) {
112 112
 					return null;
113 113
 				}
114 114
 				$var = $var[$n];
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
 	public function setOption($name, $val) {
122 122
 		// Quicker execution path for "."-free names
123
-		if(strpos($name,'.') === false) {
123
+		if (strpos($name, '.') === false) {
124 124
 			$this->options[$name] = $val;
125 125
 		} else {
126 126
 			$names = explode('.', $name);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 			// We still want to do this even if we have strict path checking for legacy code
129 129
 			$var = &$this->options;
130 130
 
131
-			foreach($names as $n) {
131
+			foreach ($names as $n) {
132 132
 				$var = &$var[$n];
133 133
 			}
134 134
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,9 @@
 block discarded – undo
101 101
 	public function getOption($name) {
102 102
 		// Quicker execution path for "."-free names
103 103
 		if (strpos($name, '.') === false) {
104
-			if (isset($this->options[$name])) return $this->options[$name];
104
+			if (isset($this->options[$name])) {
105
+				return $this->options[$name];
106
+			}
105 107
 		} else {
106 108
 			$names = explode('.', $name);
107 109
 
Please login to merge, or discard this patch.