@@ -191,8 +191,7 @@ discard block |
||
191 | 191 | $aVariables[$sParameterStr] = $sVarName; |
192 | 192 | $sVars .= "$sVarName=$xParameter;"; |
193 | 193 | $nVarId++; |
194 | - } |
|
195 | - else |
|
194 | + } else |
|
196 | 195 | { |
197 | 196 | // The value is already defined. The corresponding variable is assigned. |
198 | 197 | $sVarName = $aVariables[$sParameterStr]; |
@@ -221,8 +220,7 @@ discard block |
||
221 | 220 | $aVariables[$sParameterStr] = $sVarName; |
222 | 221 | $sVars .= "$sVarName=$xParameter;"; |
223 | 222 | $nVarId++; |
224 | - } |
|
225 | - else |
|
223 | + } else |
|
226 | 224 | { |
227 | 225 | // The value is already defined. The corresponding variable is assigned. |
228 | 226 | $sVarName = $aVariables[$sParameterStr]; |
@@ -241,8 +239,7 @@ discard block |
||
241 | 239 | { |
242 | 240 | $xConfirm = $this->getPluginManager()->getConfirm(); |
243 | 241 | $sScript = $xConfirm->confirm($sPhrase, $sScript, ''); |
244 | - } |
|
245 | - elseif($this->sCondition !== null) |
|
242 | + } elseif($this->sCondition !== null) |
|
246 | 243 | { |
247 | 244 | $sScript = 'if(' . $this->sCondition . '){' . $sScript . ';}'; |
248 | 245 | if(($sPhrase)) |
@@ -70,9 +70,9 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function hasPageNumber() |
72 | 72 | { |
73 | - foreach($this->aParameters as $xParameter) |
|
73 | + foreach ($this->aParameters as $xParameter) |
|
74 | 74 | { |
75 | - if($xParameter->getType() == Jaxon::PAGE_NUMBER) |
|
75 | + if ($xParameter->getType() == Jaxon::PAGE_NUMBER) |
|
76 | 76 | { |
77 | 77 | return true; |
78 | 78 | } |
@@ -90,9 +90,9 @@ discard block |
||
90 | 90 | public function setPageNumber($nPageNumber) |
91 | 91 | { |
92 | 92 | // Set the value of the Jaxon::PAGE_NUMBER parameter |
93 | - foreach($this->aParameters as $xParameter) |
|
93 | + foreach ($this->aParameters as $xParameter) |
|
94 | 94 | { |
95 | - if($xParameter->getType() == Jaxon::PAGE_NUMBER) |
|
95 | + if ($xParameter->getType() == Jaxon::PAGE_NUMBER) |
|
96 | 96 | { |
97 | 97 | $xParameter->setValue(intval($nPageNumber)); |
98 | 98 | break; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | { |
113 | 113 | $this->sCondition = '__confirm__'; |
114 | 114 | $this->aMessageArgs = func_get_args(); |
115 | - array_walk($this->aMessageArgs, function (&$xParameter) { |
|
115 | + array_walk($this->aMessageArgs, function(&$xParameter) { |
|
116 | 116 | $xParameter = Parameter::make($xParameter); |
117 | 117 | }); |
118 | 118 | return $this; |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | public function elseShow($sMessage) |
246 | 246 | { |
247 | 247 | $this->aMessageArgs = func_get_args(); |
248 | - array_walk($this->aMessageArgs, function (&$xParameter) { |
|
248 | + array_walk($this->aMessageArgs, function(&$xParameter) { |
|
249 | 249 | $xParameter = Parameter::make($xParameter); |
250 | 250 | }); |
251 | 251 | return $this; |
@@ -270,12 +270,12 @@ discard block |
||
270 | 270 | // This array will avoid declaring multiple variables with the same value. |
271 | 271 | // The array key is the variable value, while the array value is the variable name. |
272 | 272 | $aVariables = array(); // Array of local variables. |
273 | - foreach($this->aParameters as &$xParameter) |
|
273 | + foreach ($this->aParameters as &$xParameter) |
|
274 | 274 | { |
275 | 275 | $sParameterStr = $xParameter->getScript(); |
276 | - if($xParameter instanceof \Jaxon\JQuery\Dom\Element) |
|
276 | + if ($xParameter instanceof \Jaxon\JQuery\Dom\Element) |
|
277 | 277 | { |
278 | - if(!array_key_exists($sParameterStr, $aVariables)) |
|
278 | + if (!array_key_exists($sParameterStr, $aVariables)) |
|
279 | 279 | { |
280 | 280 | // The value is not yet defined. A new variable is created. |
281 | 281 | $sVarName = "jxnVar$nVarId"; |
@@ -293,19 +293,19 @@ discard block |
||
293 | 293 | } |
294 | 294 | |
295 | 295 | $sPhrase = ''; |
296 | - if(count($this->aMessageArgs) > 0) |
|
296 | + if (count($this->aMessageArgs) > 0) |
|
297 | 297 | { |
298 | 298 | $sPhrase = array_shift($this->aMessageArgs); // The first array entry is the question. |
299 | 299 | // $sPhrase = "'" . addslashes($sPhrase) . "'"; // Wrap the phrase with single quotes |
300 | - if(count($this->aMessageArgs) > 0) |
|
300 | + if (count($this->aMessageArgs) > 0) |
|
301 | 301 | { |
302 | 302 | $nParamId = 1; |
303 | - foreach($this->aMessageArgs as &$xParameter) |
|
303 | + foreach ($this->aMessageArgs as &$xParameter) |
|
304 | 304 | { |
305 | 305 | $sParameterStr = $xParameter->getScript(); |
306 | - if($xParameter instanceof \Jaxon\JQuery\Dom\Element) |
|
306 | + if ($xParameter instanceof \Jaxon\JQuery\Dom\Element) |
|
307 | 307 | { |
308 | - if(!array_key_exists($sParameterStr, $aVariables)) |
|
308 | + if (!array_key_exists($sParameterStr, $aVariables)) |
|
309 | 309 | { |
310 | 310 | // The value is not yet defined. A new variable is created. |
311 | 311 | $sVarName = "jxnVar$nVarId"; |
@@ -328,15 +328,15 @@ discard block |
||
328 | 328 | } |
329 | 329 | |
330 | 330 | $sScript = $this->getOption('core.prefix.' . $this->sType) . parent::getScript(); |
331 | - if($this->sCondition == '__confirm__') |
|
331 | + if ($this->sCondition == '__confirm__') |
|
332 | 332 | { |
333 | 333 | $xConfirm = $this->getPluginManager()->getConfirm(); |
334 | 334 | $sScript = $xConfirm->confirm($sPhrase, $sScript, ''); |
335 | 335 | } |
336 | - elseif($this->sCondition !== null) |
|
336 | + elseif ($this->sCondition !== null) |
|
337 | 337 | { |
338 | 338 | $sScript = 'if(' . $this->sCondition . '){' . $sScript . ';}'; |
339 | - if(($sPhrase)) |
|
339 | + if (($sPhrase)) |
|
340 | 340 | { |
341 | 341 | $xAlert = $this->getPluginManager()->getAlert(); |
342 | 342 | $xAlert->setReturn(true); |