Passed
Push — master ( d87366...62471d )
by Daniel
02:20
created
source/DomPaginationByDanielGP.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 'class'    => 'input_readonly',
86 86
                 'value'    => $sDefaultValue,
87 87
             ];
88
-            return $this->setStringIntoShortTag('input', $inputFeatures) . $aElements[$sDefaultValue];
88
+            return $this->setStringIntoShortTag('input', $inputFeatures).$aElements[$sDefaultValue];
89 89
         }
90 90
         return $this->setArrayToSelectNotReadOnly($aElements, $sDefaultValue, $selectName, $featArray);
91 91
     }
@@ -122,21 +122,21 @@  discard block
 block discarded – undo
122 122
         $sReturn             = null;
123 123
         $iRecPrPg            = min($inRecPrPg, $iAllRec);
124 124
         $iStartingPageRecord = $this->setStartingPageRecord($iCrtPgNo, $iRecPrPg, $iAllRec, $bKpFlPg);
125
-        $sReturn             .= '<span style="float:left;font-size:smaller;margin-top:1px; margin-right:1px;">'
125
+        $sReturn .= '<span style="float:left;font-size:smaller;margin-top:1px; margin-right:1px;">'
126 126
             . $this->setStringIntoTag($iAllRec, 'b')
127 127
             . $this->lclMsgCmn('i18n_RecordsAvailableNowDisplaying')
128 128
             . $this->setStringIntoTag(($iStartingPageRecord + 1), 'b')
129
-            . ' - ' . $this->setStringIntoTag(min($iAllRec, ($iStartingPageRecord + $iRecPrPg)), 'b')
129
+            . ' - '.$this->setStringIntoTag(min($iAllRec, ($iStartingPageRecord + $iRecPrPg)), 'b')
130 130
             . ' </span>';
131 131
         switch ($iCrtPgNo) {
132 132
             case 'first':
133
-                $iCrtPgNo = ceil(($iStartingPageRecord + 1 ) / $iRecPrPg);
133
+                $iCrtPgNo = ceil(($iStartingPageRecord + 1) / $iRecPrPg);
134 134
                 break;
135 135
             case 'last':
136 136
                 $iCrtPgNo = ceil($iAllRec / $iRecPrPg);
137 137
                 break;
138 138
         }
139
-        $sReturn              .= '<span style="float:right;font-size:smaller;margin-top:1px; margin-right:1px;">';
139
+        $sReturn .= '<span style="float:right;font-size:smaller;margin-top:1px; margin-right:1px;">';
140 140
         $iNumberOfPages       = ceil($iAllRec / $iRecPrPg);
141 141
         $sAdditionalArguments = '';
142 142
         if (isset($_GET)) {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         }
151 151
         if ($iCrtPgNo != 1) {
152 152
             $sReturn .= $this->setStringIntoTag($this->lclMsgCmn('i18n_Previous'), 'a', [
153
-                'href'  => ('?page=' . ($iCrtPgNo - 1 ) . $sAdditionalArguments ),
153
+                'href'  => ('?page='.($iCrtPgNo - 1).$sAdditionalArguments),
154 154
                 'class' => 'pagination'
155 155
             ]);
156 156
         } else {
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         for ($counter = 1; $counter <= $iNumberOfPages; $counter++) {
163 163
             $pages2display[$counter] = $counter;
164 164
         }
165
-        $sReturn .= '<span class="pagination"><form method="get" action="' . $_SERVER['SCRIPT_NAME'] . '">';
165
+        $sReturn .= '<span class="pagination"><form method="get" action="'.$_SERVER['SCRIPT_NAME'].'">';
166 166
         $sReturn .= $this->setArrayToSelect($pages2display, @$_REQUEST['page']
167 167
             , 'page', ['size' => 1, 'autosubmit', 'id_no' => mt_rand()]);
168 168
         if (isset($_GET)) {
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
                         foreach ($value as $value2) {
173 173
                             $sReturn .= $this->setStringIntoShortTag('input', [
174 174
                                 'type'  => 'hidden',
175
-                                'name'  => $key . '[]',
175
+                                'name'  => $key.'[]',
176 176
                                 'value' => $value2,
177 177
                             ]);
178 178
                         }
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         $sReturn .= '</form></span>';
190 190
         if ($iCrtPgNo != $iNumberOfPages) {
191 191
             $sReturn .= $this->setStringIntoTag($this->lclMsgCmn('i18n_Next'), 'a', [
192
-                'href'  => ('?page=' . ($iCrtPgNo + 1 ) . $sAdditionalArguments ),
192
+                'href'  => ('?page='.($iCrtPgNo + 1).$sAdditionalArguments),
193 193
                 'class' => 'pagination',
194 194
             ]);
195 195
         } else {
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         , $iAllRecords, $bKeepFullPage = true)
216 216
     {
217 217
         if (isset($_REQUEST['page'])) {
218
-            $iStartingPageRecord = ($_REQUEST['page'] - 1 ) * $iRecordsPerPage;
218
+            $iStartingPageRecord = ($_REQUEST['page'] - 1) * $iRecordsPerPage;
219 219
         } else {
220 220
             switch ($sDefaultPageNo) {
221 221
                 case 'last':
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
                     break;
228 228
             }
229 229
         }
230
-        if (($bKeepFullPage ) && (($iStartingPageRecord + $iRecordsPerPage ) > $iAllRecords)) {
230
+        if (($bKeepFullPage) && (($iStartingPageRecord + $iRecordsPerPage) > $iAllRecords)) {
231 231
             $iStartingPageRecord = $iAllRecords - $iRecordsPerPage;
232 232
         }
233 233
         return max(0, $iStartingPageRecord);
Please login to merge, or discard this patch.
source/DomDynamicSelectByDanielGP.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             $sReturn[] = 'submit();';
100 100
         }
101 101
         if ($sReturn != []) {
102
-            return ' onchange="javascript:' . implode('', $sReturn) . '"';
102
+            return ' onchange="javascript:'.implode('', $sReturn).'"';
103 103
         }
104 104
         return '';
105 105
     }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         ];
117 117
         if (array_key_exists($identifier, $featArray)) {
118 118
             if (is_null($translation[$identifier])) {
119
-                return ' ' . $identifier . '="' . $featArray[$identifier] . '"';
119
+                return ' '.$identifier.'="'.$featArray[$identifier].'"';
120 120
             }
121 121
             return $translation[$identifier];
122 122
         }
@@ -141,15 +141,15 @@  discard block
 block discarded – undo
141 141
             $ftArray = [];
142 142
         }
143 143
         $featArray = $this->normalizeFeatureArray($ftArray);
144
-        return '<select name="' . $selectName . '" '
145
-            . 'id="' . $this->buildSelectId($selectName, $featArray) . '" '
146
-            . 'size="' . $this->calculateSelectOptionsSize($aElements, $featArray) . '"'
144
+        return '<select name="'.$selectName.'" '
145
+            . 'id="'.$this->buildSelectId($selectName, $featArray).'" '
146
+            . 'size="'.$this->calculateSelectOptionsSize($aElements, $featArray).'"'
147 147
             . $this->eventOnChange($featArray)
148 148
             . $this->featureArraySimpleTranslated($featArray, 'disabled')
149 149
             . $this->featureArraySimpleTranslated($featArray, 'hidden')
150 150
             . $this->featureArraySimpleTranslated($featArray, 'multiselect')
151 151
             . $this->featureArraySimpleTranslated($featArray, 'style')
152
-            . '>' . $this->setOptionsForSelect($aElements, $sDefaultValue, $featArray) . '</select>';
152
+            . '>'.$this->setOptionsForSelect($aElements, $sDefaultValue, $featArray).'</select>';
153 153
     }
154 154
 
155 155
     private function setOptionGroupEnd($crtGroup, $featArray)
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             if ($crtGroup != $tempString) {
171 171
                 $sReturn[] = $this->setOptionGroupEnd($crtGroup, $featArray);
172 172
                 $crtGroup  = $tempString;
173
-                $sReturn[] = '<optgroup label="' . str_replace($featArray['grouping'], '', $crtGroup) . '">';
173
+                $sReturn[] = '<optgroup label="'.str_replace($featArray['grouping'], '', $crtGroup).'">';
174 174
             }
175 175
         }
176 176
         return ['crtGroup' => $crtGroup, 'groupFooterHeader' => implode('', $sReturn)];
@@ -207,12 +207,12 @@  discard block
 block discarded – undo
207 207
             $aFH       = $this->setOptionGroupFooterHeader($featArray, $value, $crtGroup);
208 208
             $crtGroup  = $aFH['crtGroup'];
209 209
             $sReturn[] = $aFH['groupFooterHeader']
210
-                . '<option value="' . $key . '"' . $this->setOptionSelected($key, $sDefaultValue)
211
-                . $this->featureArraySimpleTranslated($featArray, 'styleForOption') . '>'
212
-                . str_replace(['&', $crtGroup], ['&amp;', ''], $value) . '</option>';
210
+                . '<option value="'.$key.'"'.$this->setOptionSelected($key, $sDefaultValue)
211
+                . $this->featureArraySimpleTranslated($featArray, 'styleForOption').'>'
212
+                . str_replace(['&', $crtGroup], ['&amp;', ''], $value).'</option>';
213 213
         }
214 214
         $sReturn[] = $this->setOptionGroupEnd($crtGroup, $featArray);
215
-        return $this->featureArraySimpleTranslated($featArray, 'include_null') . implode('', $sReturn);
215
+        return $this->featureArraySimpleTranslated($featArray, 'include_null').implode('', $sReturn);
216 216
     }
217 217
 
218 218
 }
Please login to merge, or discard this patch.