@@ -8,15 +8,17 @@ |
||
| 8 | 8 | { |
| 9 | 9 | $text = $isCaps ? 'HELLO WORLD!' : 'Hello World!'; |
| 10 | 10 | $this->response->assign('div1', 'innerHTML', $text); |
| 11 | - if(($bNotify)) |
|
| 12 | - $this->response->dialog->success("div1 text is now $text"); |
|
| 11 | + if(($bNotify)) { |
|
| 12 | + $this->response->dialog->success("div1 text is now $text"); |
|
| 13 | + } |
|
| 13 | 14 | } |
| 14 | 15 | |
| 15 | 16 | public function setColor(string $sColor, bool $bNotify = true) |
| 16 | 17 | { |
| 17 | 18 | $this->response->assign('div1', 'style.color', $sColor); |
| 18 | - if(($bNotify)) |
|
| 19 | - $this->response->dialog->success("div1 color is now $sColor"); |
|
| 19 | + if(($bNotify)) { |
|
| 20 | + $this->response->dialog->success("div1 color is now $sColor"); |
|
| 21 | + } |
|
| 20 | 22 | } |
| 21 | 23 | |
| 22 | 24 | public function showDialog() |
@@ -8,15 +8,17 @@ |
||
| 8 | 8 | { |
| 9 | 9 | $text = $isCaps ? 'HELLO WORLD!' : 'Hello World!'; |
| 10 | 10 | $this->response->assign('div2', 'innerHTML', $text); |
| 11 | - if(($bNotify)) |
|
| 12 | - $this->response->dialog->success("div2 text is now $text"); |
|
| 11 | + if(($bNotify)) { |
|
| 12 | + $this->response->dialog->success("div2 text is now $text"); |
|
| 13 | + } |
|
| 13 | 14 | } |
| 14 | 15 | |
| 15 | 16 | public function setColor(string $sColor, bool $bNotify = true) |
| 16 | 17 | { |
| 17 | 18 | $this->response->assign('div2', 'style.color', $sColor); |
| 18 | - if(($bNotify)) |
|
| 19 | - $this->response->dialog->success("div2 color is now $sColor"); |
|
| 19 | + if(($bNotify)) { |
|
| 20 | + $this->response->dialog->success("div2 color is now $sColor"); |
|
| 21 | + } |
|
| 20 | 22 | } |
| 21 | 23 | |
| 22 | 24 | public function showDialog() |
@@ -4,21 +4,24 @@ |
||
| 4 | 4 | { |
| 5 | 5 | public function sayHello(bool $isCaps, bool $bNotify = true) |
| 6 | 6 | { |
| 7 | - if ($isCaps) |
|
| 8 | - $text = 'HELLO WORLD!'; |
|
| 9 | - else |
|
| 10 | - $text = 'Hello World!'; |
|
| 7 | + if ($isCaps) { |
|
| 8 | + $text = 'HELLO WORLD!'; |
|
| 9 | + } else { |
|
| 10 | + $text = 'Hello World!'; |
|
| 11 | + } |
|
| 11 | 12 | |
| 12 | 13 | $this->response->assign('div1', 'innerHTML', $text); |
| 13 | - if(($bNotify)) |
|
| 14 | - $this->response->dialog->success("div1 text is now $text"); |
|
| 14 | + if(($bNotify)) { |
|
| 15 | + $this->response->dialog->success("div1 text is now $text"); |
|
| 16 | + } |
|
| 15 | 17 | } |
| 16 | 18 | |
| 17 | 19 | public function setColor(string $sColor, bool $bNotify = true) |
| 18 | 20 | { |
| 19 | 21 | $this->response->assign('div1', 'style.color', $sColor); |
| 20 | - if(($bNotify)) |
|
| 21 | - $this->response->dialog->success("div1 color is now $sColor"); |
|
| 22 | + if(($bNotify)) { |
|
| 23 | + $this->response->dialog->success("div1 color is now $sColor"); |
|
| 24 | + } |
|
| 22 | 25 | } |
| 23 | 26 | |
| 24 | 27 | public function showDialog() |
@@ -4,21 +4,24 @@ |
||
| 4 | 4 | { |
| 5 | 5 | public function sayHello(bool $isCaps, bool $bNotify = true) |
| 6 | 6 | { |
| 7 | - if ($isCaps) |
|
| 8 | - $text = 'HELLO WORLD!'; |
|
| 9 | - else |
|
| 10 | - $text = 'Hello World!'; |
|
| 7 | + if ($isCaps) { |
|
| 8 | + $text = 'HELLO WORLD!'; |
|
| 9 | + } else { |
|
| 10 | + $text = 'Hello World!'; |
|
| 11 | + } |
|
| 11 | 12 | |
| 12 | 13 | $this->response->assign('div2', 'innerHTML', $text); |
| 13 | - if(($bNotify)) |
|
| 14 | - $this->response->dialog->success("div2 text is now $text"); |
|
| 14 | + if(($bNotify)) { |
|
| 15 | + $this->response->dialog->success("div2 text is now $text"); |
|
| 16 | + } |
|
| 15 | 17 | } |
| 16 | 18 | |
| 17 | 19 | public function setColor(string $sColor, bool $bNotify = true) |
| 18 | 20 | { |
| 19 | 21 | $this->response->assign('div2', 'style.color', $sColor); |
| 20 | - if(($bNotify)) |
|
| 21 | - $this->response->dialog->success("div2 color is now $sColor"); |
|
| 22 | + if(($bNotify)) { |
|
| 23 | + $this->response->dialog->success("div2 color is now $sColor"); |
|
| 24 | + } |
|
| 22 | 25 | } |
| 23 | 26 | |
| 24 | 27 | public function showDialog() |
@@ -37,8 +37,7 @@ |
||
| 37 | 37 | $this->stash()->set('calculator.result', $result); |
| 38 | 38 | // Render the result component. |
| 39 | 39 | $this->cl(Result::class)->render(); |
| 40 | - } |
|
| 41 | - catch(Exception $e) |
|
| 40 | + } catch(Exception $e) |
|
| 42 | 41 | { |
| 43 | 42 | $this->alert()->title('Error!!!')->error($e->getMessage()); |
| 44 | 43 | } |
@@ -16,8 +16,7 @@ discard block |
||
| 16 | 16 | $this->response->assign('div2', 'innerHTML', $text); |
| 17 | 17 | // $this->response->confirmCommands(1, 'Skip text notification?'); |
| 18 | 18 | $this->response->dialog->success("div2 text is now $text"); |
| 19 | - } |
|
| 20 | - else |
|
| 19 | + } else |
|
| 21 | 20 | { |
| 22 | 21 | // $this->response->confirmCommands(1, 'Skip text assignement?'); |
| 23 | 22 | $this->response->assign('div2', 'innerHTML', $text); |
@@ -32,8 +31,7 @@ discard block |
||
| 32 | 31 | $this->response->assign('div2', 'style.color', $sColor); |
| 33 | 32 | // $this->response->confirmCommands(1, 'Skip color assignement?'); |
| 34 | 33 | $this->response->dialog->success("div2 color is now $sColor"); |
| 35 | - } |
|
| 36 | - else |
|
| 34 | + } else |
|
| 37 | 35 | { |
| 38 | 36 | // $this->response->confirmCommands(1, 'Skip color assignement?'); |
| 39 | 37 | $this->response->assign('div2', 'style.color', $sColor); |
@@ -7,16 +7,18 @@ |
||
| 7 | 7 | $text = $isCaps ? 'HELLO WORLD!' : 'Hello World!'; |
| 8 | 8 | $xResponse = jaxon()->newResponse(); |
| 9 | 9 | $xResponse->assign('div2', 'innerHTML', $text); |
| 10 | - if(($bNotify)) |
|
| 11 | - $xResponse->dialog->success("div2 text is now $text"); |
|
| 10 | + if(($bNotify)) { |
|
| 11 | + $xResponse->dialog->success("div2 text is now $text"); |
|
| 12 | + } |
|
| 12 | 13 | } |
| 13 | 14 | |
| 14 | 15 | public function setColor(string $sColor, bool $bNotify = true) |
| 15 | 16 | { |
| 16 | 17 | $xResponse = jaxon()->newResponse(); |
| 17 | 18 | $xResponse->assign('div2', 'style.color', $sColor); |
| 18 | - if(($bNotify)) |
|
| 19 | - $xResponse->dialog->success("div2 color is now $sColor"); |
|
| 19 | + if(($bNotify)) { |
|
| 20 | + $xResponse->dialog->success("div2 color is now $sColor"); |
|
| 21 | + } |
|
| 20 | 22 | } |
| 21 | 23 | |
| 22 | 24 | public function showDialog() |
@@ -81,8 +81,7 @@ |
||
| 81 | 81 | { |
| 82 | 82 | // Recursively read the translations in the array |
| 83 | 83 | $this->_loadTranslations($sLanguage, $sKey, $xTranslation); |
| 84 | - } |
|
| 85 | - else |
|
| 84 | + } else |
|
| 86 | 85 | { |
| 87 | 86 | // Save this translation |
| 88 | 87 | $this->aTranslations[$sLanguage][$sKey] = $xTranslation; |
@@ -36,8 +36,7 @@ discard block |
||
| 36 | 36 | try |
| 37 | 37 | { |
| 38 | 38 | return file_get_contents($sPath); |
| 39 | - } |
|
| 40 | - catch(Exception $e) |
|
| 39 | + } catch(Exception $e) |
|
| 41 | 40 | { |
| 42 | 41 | return false; |
| 43 | 42 | } |
@@ -55,8 +54,7 @@ discard block |
||
| 55 | 54 | try |
| 56 | 55 | { |
| 57 | 56 | return Minifier::minify($sCode); |
| 58 | - } |
|
| 59 | - catch(Exception $e) |
|
| 57 | + } catch(Exception $e) |
|
| 60 | 58 | { |
| 61 | 59 | return false; |
| 62 | 60 | } |