Passed
Push — main ( 525366...99eb4f )
by Thierry
03:58
created
jaxon-examples/templates/examples/nav.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
             <div class="col-12">
6 6
                 <a href="/"><span class="badge bg-<?= $current === '' ?
7 7
                     'primary' : 'secondary'; ?>">Home</span></a>
8
-<?php foreach(menu_entries() as $example => $page): ?>
8
+<?php foreach (menu_entries() as $example => $page): ?>
9 9
                 <a href="<?= menu_url($example) ?>"><span class="badge bg-<?php 
10 10
                     echo $current === $example ? 'primary' : 'secondary'; ?>"><?php
11 11
                     echo $page['title'] ?></span></a>
Please login to merge, or discard this patch.
jaxon-examples/templates/examples/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 </p>
17 17
                     </div>
18 18
                 </div>
19
-<?php foreach(menu_entries() as $example => $page): ?>
19
+<?php foreach (menu_entries() as $example => $page): ?>
20 20
                 <div class="row col-md-12">
21 21
                     <div class="col-md-12">
22 22
 <h5 style="margin-top:15px;"><a href="<?= menu_url($example) ?>"><?= $page['title'] ?></a></h5>
Please login to merge, or discard this patch.
jaxon-examples/classes/namespace/app/Test/Test.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@
 block discarded – undo
8 8
     {
9 9
         $text = $isCaps ? 'HELLO WORLD!' : 'Hello World!';
10 10
         $this->response->assign('div1', 'innerHTML', $text);
11
-        if(($bNotify))
11
+        if (($bNotify))
12 12
             $this->response->dialog->success("div1 text is now $text");
13 13
     }
14 14
 
15 15
     public function setColor(string $sColor, bool $bNotify = true)
16 16
     {
17 17
         $this->response->assign('div1', 'style.color', $sColor);
18
-        if(($bNotify))
18
+        if (($bNotify))
19 19
             $this->response->dialog->success("div1 color is now $sColor");
20 20
     }
21 21
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,15 +8,17 @@
 block discarded – undo
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()
Please login to merge, or discard this patch.
jaxon-examples/classes/namespace/ext/Test/Test.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@
 block discarded – undo
8 8
     {
9 9
         $text = $isCaps ? 'HELLO WORLD!' : 'Hello World!';
10 10
         $this->response->assign('div2', 'innerHTML', $text);
11
-        if(($bNotify))
11
+        if (($bNotify))
12 12
             $this->response->dialog->success("div2 text is now $text");
13 13
     }
14 14
 
15 15
     public function setColor(string $sColor, bool $bNotify = true)
16 16
     {
17 17
         $this->response->assign('div2', 'style.color', $sColor);
18
-        if(($bNotify))
18
+        if (($bNotify))
19 19
             $this->response->dialog->success("div2 color is now $sColor");
20 20
     }
21 21
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,15 +8,17 @@
 block discarded – undo
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()
Please login to merge, or discard this patch.
jaxon-examples/classes/simple/app/Test/App.php 2 patches
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.
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -4,21 +4,24 @@
 block discarded – undo
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()
Please login to merge, or discard this patch.
jaxon-examples/classes/simple/ext/Test/Ext.php 2 patches
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.
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -4,21 +4,24 @@
 block discarded – undo
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()
Please login to merge, or discard this patch.
jaxon-examples/classes/calculator/app/CalcFunc.php 2 patches
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.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,7 @@
 block discarded – undo
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
         }
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/pagination-databag/code.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -10,25 +10,25 @@  discard block
 block discarded – undo
10 10
 {
11 11
     use PageDatabagTrait;
12 12
 
13
-   /**
14
-    * @inheritDoc
15
-    */
16
-   protected function bagName(): string
17
-   {
18
-       return 'page';
19
-   }
13
+    /**
14
+     * @inheritDoc
15
+     */
16
+    protected function bagName(): string
17
+    {
18
+        return 'page';
19
+    }
20 20
 
21
-   /**
22
-    * @inheritDoc
23
-    */
24
-   protected function bagAttr(): string
25
-   {
26
-       return 'number';
27
-   }
21
+    /**
22
+     * @inheritDoc
23
+     */
24
+    protected function bagAttr(): string
25
+    {
26
+        return 'number';
27
+    }
28 28
 
29
-   /**
30
-    * @inheritDoc
31
-    */
29
+    /**
30
+     * @inheritDoc
31
+     */
32 32
     protected function limit(): int
33 33
     {
34 34
         return 10;
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         return 150;
43 43
     }
44 44
  
45
-   public function html():  string
45
+    public function html():  string
46 46
     {
47 47
         return '<div style="margin-bottom:10px;font-weight:bold;">' .
48 48
             $this->bag('page')->get('title') .
Please login to merge, or discard this patch.