@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function hasPageNumber() |
60 | 60 | { |
61 | - foreach($this->aParameters as $xParameter) |
|
61 | + foreach ($this->aParameters as $xParameter) |
|
62 | 62 | { |
63 | - if($xParameter->getType() == Jaxon::PAGE_NUMBER) |
|
63 | + if ($xParameter->getType() == Jaxon::PAGE_NUMBER) |
|
64 | 64 | { |
65 | 65 | return true; |
66 | 66 | } |
@@ -78,9 +78,9 @@ discard block |
||
78 | 78 | public function setPageNumber($nPageNumber) |
79 | 79 | { |
80 | 80 | // Set the value of the Jaxon::PAGE_NUMBER parameter |
81 | - foreach($this->aParameters as $xParameter) |
|
81 | + foreach ($this->aParameters as $xParameter) |
|
82 | 82 | { |
83 | - if($xParameter->getType() == Jaxon::PAGE_NUMBER) |
|
83 | + if ($xParameter->getType() == Jaxon::PAGE_NUMBER) |
|
84 | 84 | { |
85 | 85 | $xParameter->setValue(intval($nPageNumber)); |
86 | 86 | break; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | { |
101 | 101 | $this->sCondition = '__confirm__'; |
102 | 102 | $this->aMessageArgs = func_get_args(); |
103 | - array_walk($this->aMessageArgs, function (&$xParameter) { |
|
103 | + array_walk($this->aMessageArgs, function(&$xParameter) { |
|
104 | 104 | $xParameter = Parameter::make($xParameter); |
105 | 105 | }); |
106 | 106 | return $this; |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | public function elseShow($sMessage) |
234 | 234 | { |
235 | 235 | $this->aMessageArgs = func_get_args(); |
236 | - array_walk($this->aMessageArgs, function (&$xParameter) { |
|
236 | + array_walk($this->aMessageArgs, function(&$xParameter) { |
|
237 | 237 | $xParameter = Parameter::make($xParameter); |
238 | 238 | }); |
239 | 239 | return $this; |
@@ -258,12 +258,12 @@ discard block |
||
258 | 258 | // This array will avoid declaring multiple variables with the same value. |
259 | 259 | // The array key is the variable value, while the array value is the variable name. |
260 | 260 | $aVariables = []; // Array of local variables. |
261 | - foreach($this->aParameters as &$xParameter) |
|
261 | + foreach ($this->aParameters as &$xParameter) |
|
262 | 262 | { |
263 | 263 | $sParameterStr = $xParameter->getScript(); |
264 | - if($xParameter instanceof \Jaxon\Response\Plugin\JQuery\Dom\Element) |
|
264 | + if ($xParameter instanceof \Jaxon\Response\Plugin\JQuery\Dom\Element) |
|
265 | 265 | { |
266 | - if(!array_key_exists($sParameterStr, $aVariables)) |
|
266 | + if (!array_key_exists($sParameterStr, $aVariables)) |
|
267 | 267 | { |
268 | 268 | // The value is not yet defined. A new variable is created. |
269 | 269 | $sVarName = "jxnVar$nVarId"; |
@@ -281,19 +281,19 @@ discard block |
||
281 | 281 | } |
282 | 282 | |
283 | 283 | $sPhrase = ''; |
284 | - if(count($this->aMessageArgs) > 0) |
|
284 | + if (count($this->aMessageArgs) > 0) |
|
285 | 285 | { |
286 | 286 | $sPhrase = array_shift($this->aMessageArgs); // The first array entry is the question. |
287 | 287 | // $sPhrase = "'" . addslashes($sPhrase) . "'"; // Wrap the phrase with single quotes |
288 | - if(count($this->aMessageArgs) > 0) |
|
288 | + if (count($this->aMessageArgs) > 0) |
|
289 | 289 | { |
290 | 290 | $nParamId = 1; |
291 | - foreach($this->aMessageArgs as &$xParameter) |
|
291 | + foreach ($this->aMessageArgs as &$xParameter) |
|
292 | 292 | { |
293 | 293 | $sParameterStr = $xParameter->getScript(); |
294 | - if($xParameter instanceof \Jaxon\Response\Plugin\JQuery\Dom\Element) |
|
294 | + if ($xParameter instanceof \Jaxon\Response\Plugin\JQuery\Dom\Element) |
|
295 | 295 | { |
296 | - if(!array_key_exists($sParameterStr, $aVariables)) |
|
296 | + if (!array_key_exists($sParameterStr, $aVariables)) |
|
297 | 297 | { |
298 | 298 | // The value is not yet defined. A new variable is created. |
299 | 299 | $sVarName = "jxnVar$nVarId"; |
@@ -317,14 +317,14 @@ discard block |
||
317 | 317 | |
318 | 318 | $sScript = parent::getScript(); |
319 | 319 | $xDialog = jaxon()->dialog(); |
320 | - if($this->sCondition == '__confirm__') |
|
320 | + if ($this->sCondition == '__confirm__') |
|
321 | 321 | { |
322 | 322 | $sScript = $xDialog->confirm($sPhrase, $sScript, ''); |
323 | 323 | } |
324 | - elseif($this->sCondition !== null) |
|
324 | + elseif ($this->sCondition !== null) |
|
325 | 325 | { |
326 | 326 | $sScript = 'if(' . $this->sCondition . '){' . $sScript . ';}'; |
327 | - if(($sPhrase)) |
|
327 | + if (($sPhrase)) |
|
328 | 328 | { |
329 | 329 | $xDialog->getAlert()->setReturn(true); |
330 | 330 | $sScript .= 'else{' . $xDialog->warning($sPhrase) . ';}'; |
@@ -270,8 +270,7 @@ discard block |
||
270 | 270 | $aVariables[$sParameterStr] = $sVarName; |
271 | 271 | $sVars .= "$sVarName=$xParameter;"; |
272 | 272 | $nVarId++; |
273 | - } |
|
274 | - else |
|
273 | + } else |
|
275 | 274 | { |
276 | 275 | // The value is already defined. The corresponding variable is assigned. |
277 | 276 | $sVarName = $aVariables[$sParameterStr]; |
@@ -300,8 +299,7 @@ discard block |
||
300 | 299 | $aVariables[$sParameterStr] = $sVarName; |
301 | 300 | $sVars .= "$sVarName=$xParameter;"; |
302 | 301 | $nVarId++; |
303 | - } |
|
304 | - else |
|
302 | + } else |
|
305 | 303 | { |
306 | 304 | // The value is already defined. The corresponding variable is assigned. |
307 | 305 | $sVarName = $aVariables[$sParameterStr]; |
@@ -320,8 +318,7 @@ discard block |
||
320 | 318 | if($this->sCondition == '__confirm__') |
321 | 319 | { |
322 | 320 | $sScript = $xDialog->confirm($sPhrase, $sScript, ''); |
323 | - } |
|
324 | - elseif($this->sCondition !== null) |
|
321 | + } elseif($this->sCondition !== null) |
|
325 | 322 | { |
326 | 323 | $sScript = 'if(' . $this->sCondition . '){' . $sScript . ';}'; |
327 | 324 | if(($sPhrase)) |