Passed
Push — master ( 93f15f...ee18fb )
by Thierry
02:18
created
src/DialogPlugin.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -132,19 +132,19 @@  discard block
 block discarded – undo
132 132
         $this->registerLibraries();
133 133
         $this->registerClasses();
134 134
         // Get the default modal library
135
-        if(($sName = $this->xConfigManager->getOption('dialogs.default.modal', '')))
135
+        if (($sName = $this->xConfigManager->getOption('dialogs.default.modal', '')))
136 136
         {
137 137
             $this->aLibrariesInUse[] = $sName;
138 138
             $xDialogFacade->setModalLibrary($sName);
139 139
         }
140 140
         // Get the configured message library
141
-        if(($sName = $this->xConfigManager->getOption('dialogs.default.message', '')))
141
+        if (($sName = $this->xConfigManager->getOption('dialogs.default.message', '')))
142 142
         {
143 143
             $this->aLibrariesInUse[] = $sName;
144 144
             $xDialogFacade->setMessageLibrary($sName);
145 145
         }
146 146
         // Get the configured question library
147
-        if(($sName = $this->xConfigManager->getOption('dialogs.default.question', '')))
147
+        if (($sName = $this->xConfigManager->getOption('dialogs.default.question', '')))
148 148
         {
149 149
             $this->aLibrariesInUse[] = $sName;
150 150
             $xDialogFacade->setQuestionLibrary($sName);
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      */
244 244
     protected function registerLibraries()
245 245
     {
246
-        foreach($this->aLibraries as $sName => $sClass)
246
+        foreach ($this->aLibraries as $sName => $sClass)
247 247
         {
248 248
             $this->registerLibrary($sName, $sClass);
249 249
         }
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
     protected function registerClasses()
258 258
     {
259 259
         $aLibraries = $this->xConfigManager->getOptionNames('dialogs.classes');
260
-        foreach($aLibraries as $sShortName => $sFullName)
260
+        foreach ($aLibraries as $sShortName => $sFullName)
261 261
         {
262 262
             $this->registerLibrary($sShortName, $this->xConfigManager->getOption($sFullName));
263 263
         }
@@ -334,9 +334,9 @@  discard block
 block discarded – undo
334 334
         $aNames = array_merge($this->aLibrariesInUse,
335 335
             $this->xConfigManager->getOption('dialogs.libraries', []));
336 336
         $aLibraries = [];
337
-        foreach($aNames as $sName)
337
+        foreach ($aNames as $sName)
338 338
         {
339
-            if(($xLibrary = $this->getLibrary($sName)))
339
+            if (($xLibrary = $this->getLibrary($sName)))
340 340
             {
341 341
                 $aLibraries[$xLibrary->getName()] = $xLibrary;
342 342
             }
Please login to merge, or discard this patch.
src/Libraries/JQueryConfirm/Plugin.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -76,13 +76,13 @@  discard block
 block discarded – undo
76 76
         $aOptions['title'] = $sTitle;
77 77
         $aOptions['content'] = $sMessage;
78 78
         $aOptions['buttons'] = [];
79
-        if(!array_key_exists('boxWidth', $aOptions))
79
+        if (!array_key_exists('boxWidth', $aOptions))
80 80
         {
81 81
             $aOptions['useBootstrap'] = false;
82 82
             $aOptions['boxWidth'] = '600';
83 83
         }
84 84
         $ind = 0;
85
-        foreach($aButtons as $button)
85
+        foreach ($aButtons as $button)
86 86
         {
87 87
             $_button = [
88 88
                 'text' => $button['title'],
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
                 'action' => $button['click'],
91 91
             ];
92 92
             // Optional attributes
93
-            foreach($button as $attr => $value)
93
+            foreach ($button as $attr => $value)
94 94
             {
95
-                if(!in_array($attr, ['title', 'class', 'click']))
95
+                if (!in_array($attr, ['title', 'class', 'click']))
96 96
                 {
97 97
                     $_button[$attr] = $value;
98 98
                 }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     protected function alert(string $sMessage, string $sTitle, string $sType, string $sIcon): string
126 126
     {
127
-        if($this->getReturn())
127
+        if ($this->getReturn())
128 128
         {
129 129
             return "$.alert({content:" . $sMessage . ", title:'" . $sTitle .
130 130
                 "', type:'" . $sType . "', icon:'" . $sIcon . "'})";
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     public function confirm(string $sQuestion, string $sYesScript, string $sNoScript): string
173 173
     {
174 174
         $sTitle = $this->getQuestionTitle();
175
-        if(!$sNoScript)
175
+        if (!$sNoScript)
176 176
         {
177 177
             return "jaxon.dialogs.jconfirm.confirm(" . $sQuestion . ",'" .
178 178
                 $sTitle . "',function(){" . $sYesScript . ";})";
Please login to merge, or discard this patch.