Passed
Push — master ( e5411f...1831e1 )
by Thierry
09:05
created
templates/xdialog/ready.js.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1
-<?php if(($this->defaultForMessage)): ?>
1
+<?php if (($this->defaultForMessage)): ?>
2 2
     jaxon.ajax.message.success = jaxon.dialogs.xdialog.success;
3 3
     jaxon.ajax.message.info = jaxon.dialogs.xdialog.info;
4 4
     jaxon.ajax.message.warning = jaxon.dialogs.xdialog.warning;
5 5
     jaxon.ajax.message.error = jaxon.dialogs.xdialog.error;
6 6
 <?php endif ?>
7
-<?php if(($this->defaultForQuestion)): ?>
7
+<?php if (($this->defaultForQuestion)): ?>
8 8
     jaxon.ajax.message.confirm = jaxon.dialogs.xdialog.confirm;
9 9
 <?php endif ?>
10 10
     jaxon.command.handler.register("xdialog.show", jaxon.dialogs.xdialog.show);
Please login to merge, or discard this patch.
src/CuteAlert/CuteAlertLibrary.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,11 +86,11 @@
 block discarded – undo
86 86
      */
87 87
     protected function alert(string $sContent, string $sTitle, string $sType): string
88 88
     {
89
-        if(!$sTitle)
89
+        if (!$sTitle)
90 90
         {
91 91
             $sTitle = '&nbsp;';
92 92
         }
93
-        if($this->returnCode())
93
+        if ($this->returnCode())
94 94
         {
95 95
             return "cuteAlert({message:" . $sContent . ", title:'" . $sTitle . "', type:'" . $sType . "'})";
96 96
         }
Please login to merge, or discard this patch.
src/start.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@
 block discarded – undo
29 29
         try
30 30
         {
31 31
             $jaxon->dialog()->registerLibrary($sClass, $sClass::NAME);
32
-        }
33
-        catch(SetupException $e){}
32
+        } catch(SetupException $e){}
34 33
     }
35 34
     // Register the template dir into the template renderer
36 35
     $jaxon->template()->addNamespace('jaxon::dialogs', dirname(__DIR__) . '/templates');
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,13 +41,13 @@
 block discarded – undo
41 41
         CuteAlertLibrary::class, // CuteAlert
42 42
     ];
43 43
     $jaxon = jaxon();
44
-    foreach($aLibraries as $sClass)
44
+    foreach ($aLibraries as $sClass)
45 45
     {
46 46
         try
47 47
         {
48 48
             $jaxon->dialog()->registerLibrary($sClass, $sClass::NAME);
49 49
         }
50
-        catch(SetupException $e){}
50
+        catch (SetupException $e) {}
51 51
     }
52 52
     // Register the template dir into the template renderer
53 53
     $jaxon->template()->addNamespace('jaxon::dialogs', dirname(__DIR__) . '/templates');
Please login to merge, or discard this patch.
src/XDialog/XDialogLibrary.php 2 patches
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
         $aOptions['title'] = $sTitle;
85 85
         $aOptions['body'] = $sContent;
86 86
         $aOptions['buttons'] = [];
87
-        foreach($aButtons as $aButton)
87
+        foreach ($aButtons as $aButton)
88 88
         {
89
-            if($aButton['click'] === 'close')
89
+            if ($aButton['click'] === 'close')
90 90
             {
91 91
                 $aOptions['buttons']['cancel'] = $aButton['title'];
92 92
                 $aOptions['oncancel'] = 'jaxon.dialogs.xdialog.hide()';
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     protected function alert(string $sContent, string $sTitle, string $sType): string
123 123
     {
124
-        if($this->returnCode())
124
+        if ($this->returnCode())
125 125
         {
126 126
             return "jaxon.dialogs.xdialog.$sType(" . $sContent . "'" . $sTitle . "')";
127 127
         }
@@ -170,8 +170,7 @@  discard block
 block discarded – undo
170 170
         $sTitle = $this->helper()->getQuestionTitle();
171 171
 
172 172
         return empty($sNoScript) ?
173
-            "jaxon.dialogs.xdialog.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})" :
174
-            "jaxon.dialogs.xdialog.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript .
173
+            "jaxon.dialogs.xdialog.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})" : "jaxon.dialogs.xdialog.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript .
175 174
                 ";},function(){" . $sNoScript . ";})";
176 175
     }
177 176
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,8 +90,7 @@
 block discarded – undo
90 90
             {
91 91
                 $aOptions['buttons']['cancel'] = $aButton['title'];
92 92
                 $aOptions['oncancel'] = 'jaxon.dialogs.xdialog.hide()';
93
-            }
94
-            else
93
+            } else
95 94
             {
96 95
                 $aOptions['buttons']['ok'] = $aButton['title'];
97 96
                 $aOptions['onok'] = $aButton['click'];
Please login to merge, or discard this patch.
src/Bootbox/BootboxLibrary.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
         // Assign dialog content
100 100
         $this->response()->assign($sContainer, 'innerHTML', $html);
101
-        if(isset($aOptions['width']))
101
+        if (isset($aOptions['width']))
102 102
         {
103 103
             // Set the value of the dialog width
104 104
             $width = $aOptions['width'];
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     protected function alert(string $sContent, string $sTitle, string $sType): string
128 128
     {
129
-        if($this->returnCode())
129
+        if ($this->returnCode())
130 130
         {
131 131
             return "jaxon.dialogs.bootbox.alert('" . $sType . "'," . $sContent . ",'" . $sTitle . "')";
132 132
         }
@@ -174,8 +174,7 @@  discard block
 block discarded – undo
174 174
         $sTitle = $this->helper()->getQuestionTitle();
175 175
 
176 176
         return empty($sNoScript) ?
177
-            "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})" :
178
-            "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript .
177
+            "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})" : "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript .
179 178
                 ";},function(){" . $sNoScript . ";})";
180 179
     }
181 180
 }
Please login to merge, or discard this patch.