Passed
Push — main ( fd5484...10601e )
by Thierry
05:13
created
jaxon-examples/classes/simple/app/Test/App.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,14 +10,14 @@
 block discarded – undo
10 10
             $text = 'Hello World!';
11 11
 
12 12
         $this->response->assign('div1', 'innerHTML', $text);
13
-        if(($bNotify))
13
+        if (($bNotify))
14 14
             $this->response->dialog->success("div1 text is now $text");
15 15
     }
16 16
 
17 17
     public function setColor(string $sColor, bool $bNotify = true)
18 18
     {
19 19
         $this->response->assign('div1', 'style.color', $sColor);
20
-        if(($bNotify))
20
+        if (($bNotify))
21 21
             $this->response->dialog->success("div1 color is now $sColor");
22 22
     }
23 23
 
Please login to merge, or discard this patch.
jaxon-examples/classes/simple/ext/Test/Ext.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,14 +10,14 @@
 block discarded – undo
10 10
             $text = 'Hello World!';
11 11
 
12 12
         $this->response->assign('div2', 'innerHTML', $text);
13
-        if(($bNotify))
13
+        if (($bNotify))
14 14
             $this->response->dialog->success("div2 text is now $text");
15 15
     }
16 16
 
17 17
     public function setColor(string $sColor, bool $bNotify = true)
18 18
     {
19 19
         $this->response->assign('div2', 'style.color', $sColor);
20
-        if(($bNotify))
20
+        if (($bNotify))
21 21
             $this->response->dialog->success("div2 color is now $sColor");
22 22
     }
23 23
 
Please login to merge, or discard this patch.
jaxon-examples/classes/calculator/app/CalcFunc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
             // Render the result component.
39 39
             $this->cl(Result::class)->render();
40 40
         }
41
-        catch(Exception $e)
41
+        catch (Exception $e)
42 42
         {
43 43
             $this->alert()->title('Error!!!')->error($e->getMessage());
44 44
         }
Please login to merge, or discard this patch.
jaxon-examples/classes/calculator/lib/CalculatorService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,26 +20,26 @@
 block discarded – undo
20 20
      */
21 21
     public function calculate(string $operator, string $operandA, string $operandB): mixed
22 22
     {
23
-        if(!in_array($operator, $this->operators))
23
+        if (!in_array($operator, $this->operators))
24 24
         {
25 25
             throw new Exception("$operator is not a valid operator.");
26 26
         }
27
-        if($operandA === '' || $operandB === '')
27
+        if ($operandA === '' || $operandB === '')
28 28
         {
29 29
             throw new Exception("The operands must not be empty.");
30 30
         }
31
-        if(!is_numeric($operandA))
31
+        if (!is_numeric($operandA))
32 32
         {
33 33
             throw new Exception("$operandA is not a valid operand.");
34 34
         }
35
-        if(!is_numeric($operandB))
35
+        if (!is_numeric($operandB))
36 36
         {
37 37
             throw new Exception("$operandB is not a valid operand.");
38 38
         }
39 39
 
40 40
         $operandA = intval($operandA);
41 41
         $operandB = intval($operandB);
42
-        if($operator === 'division' && $operandB === 0)
42
+        if ($operator === 'division' && $operandB === 0)
43 43
         {
44 44
             throw new Exception("Division by 0 is not allowed.");
45 45
         }
Please login to merge, or discard this patch.
jaxon-examples/examples/dialogs/page.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
 
82 82
 <?php $this->block('content') ?>
83 83
                 <div class="row">
84
-<?php foreach($aLibraries as $id => $lib): ?>
84
+<?php foreach ($aLibraries as $id => $lib): ?>
85 85
                     <div class="col-md-12">
86 86
                         <?= $lib['name'] ?>
87 87
                     </div>
88
-<?php if(is_subclass_of($lib['class'], AlertInterface::class)): ?>
88
+<?php if (is_subclass_of($lib['class'], AlertInterface::class)): ?>
89 89
                     <div class="col-md-12" style="padding-bottom: 15px;">
90 90
                         <button type="button" class="btn btn-primary" <?php
91 91
                             echo attr()->click(rq(HelloWorld::class)->showSuccess($id, $lib['name'])) ?>>Success</button>
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                             echo attr()->click(rq(HelloWorld::class)->showError($id, $lib['name'])) ?>>Error</button>
98 98
                     </div>
99 99
 <?php endif ?>
100
-<?php if(is_subclass_of($lib['class'], ConfirmInterface::class)): ?>
100
+<?php if (is_subclass_of($lib['class'], ConfirmInterface::class)): ?>
101 101
                     <div class="col-md-12" style="padding-bottom: 15px;">
102 102
                         <button type="button" class="btn btn-primary"
103 103
                             onclick="jaxon.confirm('<?= $id ?>', { title: 'Confirm', text: 'Really?' }, {
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                             })" >Confirm</button>
107 107
                     </div>
108 108
 <?php endif ?>
109
-<?php if(is_subclass_of($lib['class'], ModalInterface::class)): ?>
109
+<?php if (is_subclass_of($lib['class'], ModalInterface::class)): ?>
110 110
                     <div class="col-md-12" style="padding-bottom: 15px;">
111 111
                         <button type="button" class="btn btn-primary" <?php
112 112
                             echo attr()->click(rq(HelloWorld::class)->showDialog($id, $lib['name'])) ?>>Modal</button>
Please login to merge, or discard this patch.
jaxon-examples/examples/plugins/code.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     public function sayHello(bool $isCaps, bool $bNotify = true)
11 11
     {
12 12
         $text = $isCaps ? 'HELLO WORLD!' : 'Hello World!';
13
-        if(($bNotify))
13
+        if (($bNotify))
14 14
         {
15 15
             // $this->response->confirmCommands(2, 'Skip text assignement?');
16 16
             $this->response->assign('div2', 'innerHTML', $text);
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function setColor(string $sColor, bool $bNotify = true)
28 28
     {
29
-        if(($bNotify))
29
+        if (($bNotify))
30 30
         {
31 31
             // $this->response->confirmCommands(1, 'Skip color assignement?');
32 32
             $this->response->assign('div2', 'style.color', $sColor);
Please login to merge, or discard this patch.
jaxon-examples/examples/config/code.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
         $text = $isCaps ? 'HELLO WORLD!' : 'Hello World!';
8 8
         $xResponse = jaxon()->newResponse();
9 9
         $xResponse->assign('div2', 'innerHTML', $text);
10
-        if(($bNotify))
10
+        if (($bNotify))
11 11
             $xResponse->dialog->success("div2 text is now $text");
12 12
     }
13 13
 
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     {
16 16
         $xResponse = jaxon()->newResponse();
17 17
         $xResponse->assign('div2', 'style.color', $sColor);
18
-        if(($bNotify))
18
+        if (($bNotify))
19 19
             $xResponse->dialog->success("div2 color is now $sColor");
20 20
     }
21 21
 
Please login to merge, or discard this patch.
jaxon-examples/public/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 $menus = menu_entries();
6 6
 $example = menu_current();
7
-if(isset($menus[$example]))
7
+if (isset($menus[$example]))
8 8
 {
9 9
     renderExample($example);
10 10
     exit();
Please login to merge, or discard this patch.
jaxon-examples/public/ajax.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 $menus = menu_entries();
6 6
 $example = menu_current();
7
-if(isset($menus[$example]))
7
+if (isset($menus[$example]))
8 8
 {
9 9
     require dirname(__DIR__) . "/examples/$example/code.php";
10 10
 
Please login to merge, or discard this patch.