@@ -86,12 +86,12 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | private function getPath(string $jQueryNs, string $sPath, $xContext) |
| 88 | 88 | { |
| 89 | - if(!$sPath) |
|
| 89 | + if (!$sPath) |
|
| 90 | 90 | { |
| 91 | 91 | // If an empty selector is given, use the event target instead |
| 92 | 92 | return "$jQueryNs(e.currentTarget)"; |
| 93 | 93 | } |
| 94 | - if(!$xContext) |
|
| 94 | + if (!$xContext) |
|
| 95 | 95 | { |
| 96 | 96 | return "$jQueryNs('" . $sPath . "')"; |
| 97 | 97 | } |
@@ -110,12 +110,12 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | public function __call(string $sMethod, array $aArguments) |
| 112 | 112 | { |
| 113 | - if(count($aArguments) === 1) |
|
| 113 | + if (count($aArguments) === 1) |
|
| 114 | 114 | { |
| 115 | 115 | // If the only parameter is a selector, and the first call |
| 116 | 116 | // on that selector is a method, then the selector is a callback. |
| 117 | 117 | $xArgument = $aArguments[0]; |
| 118 | - if(is_a($xArgument, self::class) && $xArgument->bIsCallback === null && |
|
| 118 | + if (is_a($xArgument, self::class) && $xArgument->bIsCallback === null && |
|
| 119 | 119 | count($xArgument->aCalls) > 0 && is_a($xArgument->aCalls[0], JsCall::class)) |
| 120 | 120 | { |
| 121 | 121 | $xArgument->bIsCallback = true; |
@@ -188,12 +188,11 @@ discard block |
||
| 188 | 188 | public function getScript(): string |
| 189 | 189 | { |
| 190 | 190 | $sScript = $this->sPath; |
| 191 | - if(count($this->aCalls) > 0) |
|
| 191 | + if (count($this->aCalls) > 0) |
|
| 192 | 192 | { |
| 193 | 193 | $sScript .= '.' . implode('.', $this->aCalls); |
| 194 | 194 | } |
| 195 | - return $this->bIsCallback ? '(e) => {' . $sScript . '}' : |
|
| 196 | - ($this->bToInt ? "parseInt($sScript)" : $sScript); |
|
| 195 | + return $this->bIsCallback ? '(e) => {' . $sScript . '}' : ($this->bToInt ? "parseInt($sScript)" : $sScript); |
|
| 197 | 196 | } |
| 198 | 197 | |
| 199 | 198 | /** |