Test Failed
Push — master ( d0fe65...f5edd0 )
by Daniel
02:27
created
source/DomBasicComponentsByDanielGP.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
         }
46 46
         $attributes = '';
47 47
         foreach ($features as $key => $value) {
48
-            $val        = $this->buildAttributesForTagValueArray($value);
49
-            $attributes .= ' ' . $key . '="' . $val . '"';
48
+            $val = $this->buildAttributesForTagValueArray($value);
49
+            $attributes .= ' '.$key.'="'.$val.'"';
50 50
         }
51 51
         return $attributes;
52 52
     }
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
         if (is_array($value)) {
58 58
             $valA = [];
59 59
             foreach ($value as $key2 => $value2) {
60
-                $valA[] = $key2 . ':' . $value2;
60
+                $valA[] = $key2.':'.$value2;
61 61
             }
62
-            $val = implode(';', $valA) . ';';
62
+            $val = implode(';', $valA).';';
63 63
         }
64 64
         return $val;
65 65
     }
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
     protected function setClearBoth1px($height = 1)
104 104
     {
105 105
         $divStyle = implode('', [
106
-            'height:' . $height . 'px;',
107
-            'line-height:' . $height . 'px;',
106
+            'height:'.$height.'px;',
107
+            'line-height:'.$height.'px;',
108 108
             'float:none;',
109 109
             'clear:both;',
110 110
             'margin:0px;'
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         $legend = $this->setStringIntoTag($sTitle, 'legend', ['style' => $this->setFeedbackStyle($sType)]);
129 129
         return implode('', [
130 130
             ($skipBr ? '' : '<br/>'),
131
-            $this->setStringIntoTag($legend . $sMsg, 'fieldset', ['style' => $this->setFeedbackStyle($sType)]),
131
+            $this->setStringIntoTag($legend.$sMsg, 'fieldset', ['style' => $this->setFeedbackStyle($sType)]),
132 132
         ]);
133 133
     }
134 134
 
@@ -146,10 +146,10 @@  discard block
 block discarded – undo
146 146
     private function setFeedbackStyleArray($color1, $color2)
147 147
     {
148 148
         return [
149
-            'Title' => 'margin-top:-5px;margin-right:20px;padding:5px;background-color:' . $color1
150
-            . ';color:' . $color2 . 'border:medium solid ' . $color1 . ';',
151
-            'Msg'   => 'display:inline;padding-right:5px;padding-bottom:5px;background-color:' . $color2
152
-            . ';color:' . $color1 . ';border:medium solid ' . $color1 . ';',
149
+            'Title' => 'margin-top:-5px;margin-right:20px;padding:5px;background-color:'.$color1
150
+            . ';color:'.$color2.'border:medium solid '.$color1.';',
151
+            'Msg'   => 'display:inline;padding-right:5px;padding-bottom:5px;background-color:'.$color2
152
+            . ';color:'.$color1.';border:medium solid '.$color1.';',
153 153
         ];
154 154
     }
155 155
 
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
             $gzipCntntOriginal = ob_get_contents();
181 181
             ob_end_clean();
182 182
             $gzipCntnt         = gzcompress($gzipCntntOriginal, 9);
183
-            echo "\x1f\x8b\x08\x00\x00\x00\x00\x00" . substr($gzipCntnt, 0, strlen($gzipCntnt) - 4)
184
-            . pack('V', crc32($gzipCntntOriginal)) . pack('V', strlen($gzipCntntOriginal));
183
+            echo "\x1f\x8b\x08\x00\x00\x00\x00\x00".substr($gzipCntnt, 0, strlen($gzipCntnt) - 4)
184
+            . pack('V', crc32($gzipCntntOriginal)).pack('V', strlen($gzipCntntOriginal));
185 185
         } elseif ($outputType === 'Header') {
186 186
             ob_start();
187 187
             ob_implicit_flush(0);
@@ -205,8 +205,8 @@  discard block
 block discarded – undo
205 205
      */
206 206
     protected function setHeaderNoCache($contentType = 'application/json')
207 207
     {
208
-        header("Content-Type: " . $contentType . "; charset=utf-8");
209
-        header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
208
+        header("Content-Type: ".$contentType."; charset=utf-8");
209
+        header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
210 210
         header("Cache-Control: no-store, no-cache, must-revalidate");
211 211
         header("Cache-Control: post-check=0, pre-check=0", false);
212 212
         header("Pragma: no-cache");
@@ -221,8 +221,8 @@  discard block
 block discarded – undo
221 221
      */
222 222
     protected function setStringIntoShortTag($sTag, $features = null)
223 223
     {
224
-        return '<' . $sTag . $this->buildAttributesForTag($features)
225
-            . (isset($features['dont_close']) ? '' : '/') . '>';
224
+        return '<'.$sTag.$this->buildAttributesForTag($features)
225
+            . (isset($features['dont_close']) ? '' : '/').'>';
226 226
     }
227 227
 
228 228
     /**
@@ -235,12 +235,12 @@  discard block
 block discarded – undo
235 235
      */
236 236
     protected function setStringIntoTag($sString, $sTag, $features = null)
237 237
     {
238
-        return '<' . $sTag . $this->buildAttributesForTag($features) . '>' . $sString . '</' . $sTag . '>';
238
+        return '<'.$sTag.$this->buildAttributesForTag($features).'>'.$sString.'</'.$sTag.'>';
239 239
     }
240 240
 
241 241
     protected function setViewModernLinkAdd($identifier, $ftrs = null)
242 242
     {
243
-        $btnText     = '<i class="fa fa-plus-square">&nbsp;</i>' . '&nbsp;' . $this->lclMsgCmn('i18n_AddNewRecord');
243
+        $btnText     = '<i class="fa fa-plus-square">&nbsp;</i>'.'&nbsp;'.$this->lclMsgCmn('i18n_AddNewRecord');
244 244
         $tagFeatures = [
245 245
             'href'  => $this->setViewModernLinkAddUrl($identifier, $ftrs),
246 246
             'style' => 'margin: 5px 0px 10px 0px; display: inline-block;',
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         $sArgmnts = '';
254 254
         if (isset($ftrs['injectAddArguments'])) {
255 255
             foreach ($ftrs['injectAddArguments'] as $key => $value) {
256
-                $sArgmnts .= '&amp;' . $key . '=' . $value;
256
+                $sArgmnts .= '&amp;'.$key.'='.$value;
257 257
             }
258 258
         }
259 259
         return $sArgmnts;
@@ -263,9 +263,9 @@  discard block
 block discarded – undo
263 263
     {
264 264
         $sArgmnts  = $this->setViewModernLinkAddInjectedArguments($ftrs);
265 265
         $this->initializeSprGlbAndSession();
266
-        $addingUrl = $this->tCmnRequest->server->get('PHP_SELF') . '?view=add_' . $identifier . $sArgmnts;
266
+        $addingUrl = $this->tCmnRequest->server->get('PHP_SELF').'?view=add_'.$identifier.$sArgmnts;
267 267
         if (!isset($ftrs['NoAjax'])) {
268
-            $addingUrl = 'javascript:loadAE(\'' . $addingUrl . '\');';
268
+            $addingUrl = 'javascript:loadAE(\''.$addingUrl.'\');';
269 269
         }
270 270
         return $addingUrl;
271 271
     }
Please login to merge, or discard this patch.
source/DomPaginationByDanielGP.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -61,18 +61,18 @@  discard block
 block discarded – undo
61 61
             . $this->setStringIntoTag($iAllRec, 'b')
62 62
             . $this->lclMsgCntrl('i18n_RecordsAvailableNowDisplaying')
63 63
             . $this->setStringIntoTag(($iStartingPageRecord + 1), 'b')
64
-            . ' - ' . $this->setStringIntoTag(
64
+            . ' - '.$this->setStringIntoTag(
65 65
                 min($iAllRec, ($iStartingPageRecord + $iRecPrPg)), 'b')
66 66
             . ' </span>';
67 67
         switch ($iCrtPgNo) {
68 68
             case 'first':
69
-                $iCrtPgNo = ceil(($iStartingPageRecord + 1 ) / $iRecPrPg);
69
+                $iCrtPgNo = ceil(($iStartingPageRecord + 1) / $iRecPrPg);
70 70
                 break;
71 71
             case 'last':
72 72
                 $iCrtPgNo = ceil($iAllRec / $iRecPrPg);
73 73
                 break;
74 74
         }
75
-        $sReturn              .= '<span style="float:right;font-size:smaller; '
75
+        $sReturn .= '<span style="float:right;font-size:smaller; '
76 76
             . 'margin-top:1px; margin-right:1px;">';
77 77
         $iNumberOfPages       = ceil($iAllRec / $iRecPrPg);
78 78
         $sAdditionalArguments = '';
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         }
89 89
         if ($iCrtPgNo != 1) {
90 90
             $sReturn .= $this->setStringIntoTag($this->lclMsgCntrl('i18n_Previous'), 'a', [
91
-                'href'  => ('?page=' . ($iCrtPgNo - 1 ) . $sAdditionalArguments ),
91
+                'href'  => ('?page='.($iCrtPgNo - 1).$sAdditionalArguments),
92 92
                 'class' => 'pagination'
93 93
             ]);
94 94
         } else {
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             $pages2display[$counter] = $counter;
101 101
         }
102 102
         $sReturn .= '<span class="pagination"><form method="get" action="'
103
-            . $_SERVER['SCRIPT_NAME'] . '">';
103
+            . $_SERVER['SCRIPT_NAME'].'">';
104 104
         $sReturn .= $this->setArrayToSelect($pages2display, @$_REQUEST['page']
105 105
             , 'page', ['size' => 1, 'autosubmit', 'id_no' => mt_rand()]);
106 106
         if (isset($_GET)) {
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                         foreach ($value as $value2) {
111 111
                             $sReturn .= $this->setStringIntoShortTag('input'
112 112
                                 , ['type'  => 'hidden'
113
-                                , 'name'  => $key . '[]'
113
+                                , 'name'  => $key.'[]'
114 114
                                 , 'value' => $value2]);
115 115
                         }
116 116
                     } else {
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $sReturn .= '</form></span>';
125 125
         if ($iCrtPgNo != $iNumberOfPages) {
126 126
             $sReturn .= $this->setStringIntoTag($this->lclMsgCntrl('i18n_Next'), 'a', [
127
-                'href'  => ('?page=' . ($iCrtPgNo + 1 ) . $sAdditionalArguments ),
127
+                'href'  => ('?page='.($iCrtPgNo + 1).$sAdditionalArguments),
128 128
                 'class' => 'pagination'
129 129
             ]);
130 130
         } else {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         , $iAllRecords, $bKeepFullPage = true)
151 151
     {
152 152
         if (isset($_REQUEST['page'])) {
153
-            $iStartingPageRecord = ($_REQUEST['page'] - 1 ) * $iRecordsPerPage;
153
+            $iStartingPageRecord = ($_REQUEST['page'] - 1) * $iRecordsPerPage;
154 154
         } else {
155 155
             switch ($sDefaultPageNo) {
156 156
                 case 'last':
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                     break;
163 163
             }
164 164
         }
165
-        if (($bKeepFullPage ) && (($iStartingPageRecord + $iRecordsPerPage ) > $iAllRecords)) {
165
+        if (($bKeepFullPage) && (($iStartingPageRecord + $iRecordsPerPage) > $iAllRecords)) {
166 166
             $iStartingPageRecord = $iAllRecords - $iRecordsPerPage;
167 167
         }
168 168
         return max(0, $iStartingPageRecord);
Please login to merge, or discard this patch.
source/DomCssAndJavascriptByDanielGP.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
                 }
76 76
             }
77 77
         }
78
-        return '<style type="text/css" media="' . $attr['media'] . '">'
79
-            . $cssContent . '</style>';
78
+        return '<style type="text/css" media="'.$attr['media'].'">'
79
+            . $cssContent.'</style>';
80 80
     }
81 81
 
82 82
     /**
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
         }
93 93
         if (in_array($this->getClientRealIpAddress(), $hostsWithoutCDNrq)) {
94 94
             return '<link rel="stylesheet" type="text/css" href="'
95
-                . filter_var($cssFileName, FILTER_SANITIZE_STRING) . '" />';
95
+                . filter_var($cssFileName, FILTER_SANITIZE_STRING).'" />';
96 96
         }
97 97
         $patternFound = $this->setCssFileCDN($cssFileName);
98 98
         return '<link rel="stylesheet" type="text/css" href="'
99
-            . filter_var($patternFound[1], FILTER_SANITIZE_STRING) . '" />';
99
+            . filter_var($patternFound[1], FILTER_SANITIZE_STRING).'" />';
100 100
     }
101 101
 
102 102
     /**
@@ -109,19 +109,19 @@  discard block
 block discarded – undo
109 109
     {
110 110
         $cnt = implode(PHP_EOL, [
111 111
             '$(document).ready(function(){',
112
-            '$("form#' . $frmId . '").submit(function(){',
113
-            '$("form#' . $frmId . ' input[type=checkbox]").attr("readonly", true);',
114
-            '$("form#' . $frmId . ' input[type=password]").attr("readonly", true);',
115
-            '$("form#' . $frmId . ' input[type=radio]").attr("readonly", true);',
116
-            '$("form#' . $frmId . ' input[type=text]").attr("readonly", true);',
117
-            '$("form#' . $frmId . ' textarea").attr("readonly", true);',
118
-            '$("form#' . $frmId . ' select").attr("readonly", true);',
112
+            '$("form#'.$frmId.'").submit(function(){',
113
+            '$("form#'.$frmId.' input[type=checkbox]").attr("readonly", true);',
114
+            '$("form#'.$frmId.' input[type=password]").attr("readonly", true);',
115
+            '$("form#'.$frmId.' input[type=radio]").attr("readonly", true);',
116
+            '$("form#'.$frmId.' input[type=text]").attr("readonly", true);',
117
+            '$("form#'.$frmId.' textarea").attr("readonly", true);',
118
+            '$("form#'.$frmId.' select").attr("readonly", true);',
119 119
             '$("input[type=submit]").attr("disabled", "disabled");',
120
-            '$("input[type=submit]").attr("value", "' . $this->lclMsgCmn('i18n_Form_ButtonSaving') . '");',
120
+            '$("input[type=submit]").attr("value", "'.$this->lclMsgCmn('i18n_Form_ButtonSaving').'");',
121 121
             '});',
122 122
             '});',
123 123
         ]);
124
-        return $this->setJavascriptContent(PHP_EOL . $cnt . PHP_EOL);
124
+        return $this->setJavascriptContent(PHP_EOL.$cnt.PHP_EOL);
125 125
     }
126 126
 
127 127
     /**
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     {
134 134
         return $this->setJavascriptContent(implode('', [
135 135
                 'function loadAE(action) {',
136
-                'document.getElementById("' . $tabName . '").tabber.tabShow(1);',
136
+                'document.getElementById("'.$tabName.'").tabber.tabShow(1);',
137 137
                 '$("#DynamicAddEditSpacer").load(action',
138 138
                 '+"&specialHook[]=noHeader"',
139 139
                 '+"&specialHook[]=noMenu"',
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     protected function setJavascriptContent($javascriptContent)
154 154
     {
155
-        return '<script type="text/javascript">' . $javascriptContent . '</script>';
155
+        return '<script type="text/javascript">'.$javascriptContent.'</script>';
156 156
     }
157 157
 
158 158
     /**
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         return $this->setJavascriptContent('function setQuest(a, b) { '
166 166
                 . 'c = a.indexOf("_"); switch(a.slice(0, c)) { '
167 167
                 . 'case \'delete\': '
168
-                . 'if (confirm(\'' . $this->lclMsgCmn('i18n_ActionDelete_ConfirmationQuestion') . '\')) { '
168
+                . 'if (confirm(\''.$this->lclMsgCmn('i18n_ActionDelete_ConfirmationQuestion').'\')) { '
169 169
                 . 'window.location = document.location.protocol + "//" + '
170 170
                 . 'document.location.host + document.location.pathname + '
171 171
                 . '"?view=" + a + "&" + b; } break; } }');
@@ -183,10 +183,10 @@  discard block
 block discarded – undo
183 183
             $hostsWithoutCDNrq = [];
184 184
         }
185 185
         if (in_array($this->getClientRealIpAddress(), $hostsWithoutCDNrq)) {
186
-            return '<script type="text/javascript" src="' . $jsFileName . '"></script>';
186
+            return '<script type="text/javascript" src="'.$jsFileName.'"></script>';
187 187
         }
188 188
         $patternFound = $this->setJavascriptFileCDN($jsFileName);
189
-        return '<script type="text/javascript" src="' . $patternFound[1] . '"></script>' . $patternFound[2];
189
+        return '<script type="text/javascript" src="'.$patternFound[1].'"></script>'.$patternFound[2];
190 190
     }
191 191
 
192 192
     /**
@@ -197,14 +197,14 @@  discard block
 block discarded – undo
197 197
      */
198 198
     protected function setJavascriptFileContent($jsFileName)
199 199
     {
200
-        return '<script type="text/javascript">' . file_get_contents($jsFileName, true) . '</script>';
200
+        return '<script type="text/javascript">'.file_get_contents($jsFileName, true).'</script>';
201 201
     }
202 202
 
203 203
     protected function updateDivTitleName($rememberGroupVal, $groupCounter)
204 204
     {
205 205
         $jsContent = '$(document).ready(function() { $("#tab_'
206
-            . $this->cleanStringForId($rememberGroupVal) . '").attr("title", "'
207
-            . $rememberGroupVal . ' (' . $groupCounter . ')"); });';
206
+            . $this->cleanStringForId($rememberGroupVal).'").attr("title", "'
207
+            . $rememberGroupVal.' ('.$groupCounter.')"); });';
208 208
         return $this->setJavascriptContent($jsContent);
209 209
     }
210 210
 
Please login to merge, or discard this patch.