@@ -134,23 +134,23 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | public static function make($xValue): ParameterInterface |
| 136 | 136 | {
|
| 137 | - if($xValue instanceof ParameterInterface) |
|
| 137 | + if ($xValue instanceof ParameterInterface) |
|
| 138 | 138 | {
|
| 139 | 139 | return $xValue; |
| 140 | 140 | } |
| 141 | - if(is_numeric($xValue)) |
|
| 141 | + if (is_numeric($xValue)) |
|
| 142 | 142 | {
|
| 143 | 143 | return new Parameter(self::NUMERIC_VALUE, $xValue); |
| 144 | 144 | } |
| 145 | - if(is_string($xValue)) |
|
| 145 | + if (is_string($xValue)) |
|
| 146 | 146 | {
|
| 147 | 147 | return new Parameter(self::QUOTED_VALUE, $xValue); |
| 148 | 148 | } |
| 149 | - if(is_bool($xValue)) |
|
| 149 | + if (is_bool($xValue)) |
|
| 150 | 150 | {
|
| 151 | 151 | return new Parameter(self::BOOL_VALUE, $xValue); |
| 152 | 152 | } |
| 153 | - if($xValue instanceof JsCall) |
|
| 153 | + if ($xValue instanceof JsCall) |
|
| 154 | 154 | {
|
| 155 | 155 | return new Parameter(self::JS_CALL, $xValue); |
| 156 | 156 | } |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | */ |
| 253 | 253 | protected function getNumericValueScript(): string |
| 254 | 254 | {
|
| 255 | - return (string)$this->xValue; |
|
| 255 | + return (string) $this->xValue; |
|
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | /** |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | */ |
| 263 | 263 | protected function getUnquotedValueScript(): string |
| 264 | 264 | {
|
| 265 | - return (string)$this->xValue; |
|
| 265 | + return (string) $this->xValue; |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | /** |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | */ |
| 285 | 285 | protected function getPageNumberScript(): string |
| 286 | 286 | {
|
| 287 | - return (string)$this->xValue; |
|
| 287 | + return (string) $this->xValue; |
|
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | /** |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | public function getScript(): string |
| 306 | 306 | {
|
| 307 | 307 | $sMethodName = 'get' . $this->sType . 'Script'; |
| 308 | - if(!method_exists($this, $sMethodName)) |
|
| 308 | + if (!method_exists($this, $sMethodName)) |
|
| 309 | 309 | {
|
| 310 | 310 | return ''; |
| 311 | 311 | } |
@@ -2,18 +2,18 @@ |
||
| 2 | 2 | <?php |
| 3 | 3 | // An exported PHP class can have the same name as a subdir in the same parent dir. |
| 4 | 4 | // So, we must make sure that embedded js objects do not already exist, before we create them. |
| 5 | -if(strpos($sJsClass, '.') !== false): ?> |
|
| 5 | +if (strpos($sJsClass, '.') !== false): ?> |
|
| 6 | 6 | if(<?php echo $sJsClass ?> === undefined) { |
| 7 | 7 | <?php echo $sJsClass ?> = {}; |
| 8 | 8 | } |
| 9 | 9 | <?php else: ?> |
| 10 | 10 | <?php echo $sJsClass ?> = {}; |
| 11 | 11 | <?php endif ?> |
| 12 | -<?php foreach($this->aMethods as $aMethod): ?> |
|
| 12 | +<?php foreach ($this->aMethods as $aMethod): ?> |
|
| 13 | 13 | <?php echo $sJsClass ?>.<?php echo $aMethod['name'] ?> = function() { |
| 14 | 14 | return jaxon.request({ jxncls: '<?php echo $this->sClass ?>', jxnmthd: '<?php |
| 15 | 15 | echo $aMethod['name'] ?>' }, { parameters: arguments<?php |
| 16 | - foreach($aMethod['config'] as $sKey => $sValue): ?>, <?php |
|
| 16 | + foreach ($aMethod['config'] as $sKey => $sValue): ?>, <?php |
|
| 17 | 17 | echo $sKey ?>: <?php echo $sValue ?><?php endforeach ?> }); |
| 18 | 18 | }; |
| 19 | 19 | <?php endforeach; |
@@ -6,7 +6,8 @@ discard block |
||
| 6 | 6 | if(<?php echo $sJsClass ?> === undefined) { |
| 7 | 7 | <?php echo $sJsClass ?> = {}; |
| 8 | 8 | } |
| 9 | -<?php else: ?> |
|
| 9 | +<?php else { |
|
| 10 | + : ?> |
|
| 10 | 11 | <?php echo $sJsClass ?> = {}; |
| 11 | 12 | <?php endif ?> |
| 12 | 13 | <?php foreach($this->aMethods as $aMethod): ?> |
@@ -17,3 +18,4 @@ discard block |
||
| 17 | 18 | echo $sKey ?>: <?php echo $sValue ?><?php endforeach ?> }); |
| 18 | 19 | }; |
| 19 | 20 | <?php endforeach; |
| 21 | +} |
|