@@ -98,6 +98,9 @@ |
||
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) { |
@@ -46,9 +46,9 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -101,7 +101,9 @@ |
||
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 |