| Conditions | 93 |
| Paths | > 20000 |
| Total Lines | 399 |
| Code Lines | 306 |
| Lines | 54 |
| Ratio | 13.53 % |
| Changes | 8 | ||
| Bugs | 0 | Features | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 110 | protected function setArrayToTable($aElements, $ftrs = null, $bKpFlPge = true) |
||
| 111 | { |
||
| 112 | $rows = count($aElements); |
||
| 113 | if ($rows == 0) { |
||
| 114 | $divTab = [ |
||
| 115 | 'start' => '', |
||
| 116 | 'end' => '', |
||
| 117 | ]; |
||
| 118 | if (array_key_exists('showGroupingCounter', $ftrs)) { |
||
| 119 | if (array_key_exists('grouping_cell_type', $ftrs) && ($ftrs['grouping_cell_type'] == 'tab')) { |
||
| 120 | $ditTitle = 'No data found'; |
||
| 121 | if (isset($ftrs['showGroupingCounter'])) { |
||
| 122 | $ditTitle .= ' (0)'; |
||
| 123 | } |
||
| 124 | $divTab = [ |
||
| 125 | 'start' => '<div class="tabbertab tabbertabdefault" id="tab_NoData" title="' . $ditTitle . '">', |
||
| 126 | 'end' => '</div><!-- from tab_NoData -->', |
||
| 127 | ]; |
||
| 128 | if (!isset($ftrs['noGlobalTab'])) { |
||
| 129 | $divTab = [ |
||
| 130 | 'start' => '<div class="tabber" id="tab">' . $divTab['start'], |
||
| 131 | 'end' => $divTab['end'] . '</div><!-- from global Tab -->', |
||
| 132 | ]; |
||
| 133 | } |
||
| 134 | } |
||
| 135 | } |
||
| 136 | return $divTab['start'] |
||
| 137 | . $this->setFeedbackModern('error', 'Error', $this->lclMsgCmn('i18n_NoData')) |
||
| 138 | . $divTab['end']; |
||
| 139 | } |
||
| 140 | if (isset($ftrs['limits'])) { |
||
| 141 | $ftrs['limits'][1] = min($ftrs['limits'][1], $ftrs['limits'][2]); |
||
| 142 | if ($ftrs['limits'][2] > $ftrs['limits'][1]) { |
||
| 143 | $iStartingPageRecord = 1; |
||
| 144 | } |
||
| 145 | } |
||
| 146 | $sReturn = ''; |
||
| 147 | if (isset($ftrs['hidden_columns'])) { |
||
| 148 | $hdClmns = $this->setArrayValuesAsKey($ftrs['hidden_columns']); |
||
| 149 | } else { |
||
| 150 | $hdClmns = ['']; |
||
| 151 | } |
||
| 152 | if ((isset($ftrs['actions']['checkbox_inlineEdit'])) || (isset($ftrs['actions']['checkbox']))) { |
||
| 153 | $checkboxFormId = 'frm' . date('YmdHis'); |
||
| 154 | $sReturn .= '<form id="' . $checkboxFormId . '" ' . 'name="' . $checkboxFormId |
||
| 155 | . '" method="post" ' . ' action="' . $_SERVER['PHP_SELF'] . '" >'; |
||
| 156 | } |
||
| 157 | $tbl['Def'] = '<table' |
||
| 158 | . (isset($ftrs['table_style']) ? ' style="' . $ftrs['table_style'] . '"' : '') |
||
| 159 | . (isset($ftrs['table_class']) ? ' class="' . $ftrs['table_class'] . '"' : '') |
||
| 160 | . '>'; |
||
| 161 | if (!isset($ftrs['grouping_cell_type'])) { |
||
| 162 | $ftrs['grouping_cell_type'] = 'row'; |
||
| 163 | } |
||
| 164 | switch ($ftrs['grouping_cell_type']) { |
||
| 165 | case 'row': |
||
| 166 | $sReturn .= $tbl['Def']; |
||
| 167 | break; |
||
| 168 | case 'tab': |
||
| 169 | if (!isset($ftrs['noGlobalTab'])) { |
||
| 170 | $sReturn .= '<div class="tabber" id="tab">'; |
||
| 171 | } |
||
| 172 | break; |
||
| 173 | } |
||
| 174 | $iTableColumns = 0; |
||
| 175 | $remebered_value = -1; |
||
| 176 | $remindGroupValue = null; |
||
| 177 | $color_no = null; |
||
| 178 | if (!isset($ftrs['headers_breaked'])) { |
||
| 179 | $ftrs['headers_breaked'] = true; |
||
| 180 | } |
||
| 181 | for ($rCntr = 0; $rCntr < $rows; $rCntr++) { |
||
| 182 | if ($rCntr == 0) { |
||
| 183 | $header = array_diff_key($aElements[$rCntr], $hdClmns); |
||
| 184 | $iTableColumns = count($header); |
||
| 185 | if (isset($ftrs['computed_columns'])) { |
||
| 186 | $iTableColumns += count($ftrs['computed_columns']); |
||
| 187 | } |
||
| 188 | if (isset($ftrs['actions'])) { |
||
| 189 | $iTableColumns += 1; |
||
| 190 | } |
||
| 191 | if (isset($ftrs['grouping_cell'])) { |
||
| 192 | $iTableColumns -= 1; |
||
| 193 | } |
||
| 194 | $tbl['Head'] = '<thead>'; |
||
| 195 | if ($ftrs['grouping_cell_type'] == 'row') { |
||
| 196 | $sReturn .= $tbl['Head']; |
||
| 197 | } |
||
| 198 | View Code Duplication | if (isset($iStartingPageRecord)) { |
|
| 199 | $pgn = $this->setPagination($ftrs['limits'][0], $ftrs['limits'][1], $ftrs['limits'][2], $bKpFlPge); |
||
| 200 | $sReturn .= $this->setStringIntoTag($this->setStringIntoTag($pgn, 'th', [ |
||
| 201 | 'colspan' => $iTableColumns |
||
| 202 | ]), 'tr'); |
||
| 203 | } |
||
| 204 | $tbl['Header'] = '<tr>'; |
||
| 205 | if (isset($ftrs['grouping_cell'])) { // Grouping columns |
||
| 206 | $header = array_diff_key($header, [$ftrs['grouping_cell'] => '']); |
||
| 207 | } |
||
| 208 | if (isset($ftrs['actions'])) { // Action column |
||
| 209 | $tbl['Header'] .= '<th> </th>'; |
||
| 210 | } |
||
| 211 | if (isset($ftrs['RowStyle'])) { //Exclude style columns from displaying |
||
| 212 | $tmpClmns = $this->setArrayValuesAsKey([$ftrs['RowStyle']]); |
||
| 213 | $header = array_diff_key($header, $tmpClmns); |
||
| 214 | $hdClmns = array_merge($hdClmns, $tmpClmns); |
||
| 215 | unset($tmpClmns); |
||
| 216 | } |
||
| 217 | $tbl['Header'] .= $this->setTableHeader($header, $ftrs['headers_breaked']); // Regular columns |
||
| 218 | if (isset($ftrs['computed_columns'])) { // Computed columns |
||
| 219 | $tbl['Header'] .= $this->setTableHeader($ftrs['computed_columns'], $ftrs['headers_breaked']); |
||
| 220 | } |
||
| 221 | $tbl['Header'] .= '</tr></thead><tbody>'; |
||
| 222 | if ($ftrs['grouping_cell_type'] == 'row') { |
||
| 223 | $sReturn .= $tbl['Header']; |
||
| 224 | } |
||
| 225 | } |
||
| 226 | $row_current = array_diff_key($aElements[$rCntr], $hdClmns); |
||
| 227 | if (isset($ftrs['row_colored_alternated'])) { |
||
| 228 | if ($ftrs['row_colored_alternated'][0] == '#') { |
||
| 229 | $color_column_value = $rCntr; |
||
| 230 | } else { |
||
| 231 | $color_column_value = $row_current[$ftrs['row_colored_alternated'][0]]; |
||
| 232 | } |
||
| 233 | if ($remebered_value != $color_column_value) { |
||
| 234 | if (isset($color_no)) { |
||
| 235 | $color_no = 1; |
||
| 236 | } else { |
||
| 237 | $color_no = 2; |
||
| 238 | } |
||
| 239 | $remebered_value = $color_column_value; |
||
| 240 | } |
||
| 241 | $color = ' style="background-color: ' . $ftrs['row_colored_alternated'][$color_no] . ';"'; |
||
| 242 | } else { |
||
| 243 | if (isset($ftrs['RowStyle'])) { |
||
| 244 | $color = ' style="' . $aElements[$rCntr][$ftrs['RowStyle']] . '"'; |
||
| 245 | } else { |
||
| 246 | $color = ''; |
||
| 247 | } |
||
| 248 | } |
||
| 249 | $tbl['tr_Color'] = '<tr' . $color . '>'; |
||
| 250 | // Grouping column |
||
| 251 | if (isset($ftrs['grouping_cell'])) { |
||
| 252 | foreach ($aElements[$rCntr] as $key => $value) { |
||
| 253 | if (($ftrs['grouping_cell'] == $key) && ($remindGroupValue != $value)) { |
||
| 254 | switch ($ftrs['grouping_cell_type']) { |
||
| 255 | case 'row': |
||
| 256 | $sReturn .= $tbl['tr_Color'] . '<td ' . 'colspan="' . $iTableColumns . '">' |
||
| 257 | . $this->setStringIntoTag($value, 'div', ['class' => 'rowGroup rounded']) |
||
| 258 | . '</td></tr>'; |
||
| 259 | break; |
||
| 260 | case 'tab': |
||
| 261 | if (is_null($remindGroupValue)) { |
||
| 262 | if (isset($ftrs['showGroupingCounter'])) { |
||
| 263 | $groupCounter = 0; |
||
| 264 | } |
||
| 265 | } else { |
||
| 266 | $sReturn .= '</tbody></table>'; |
||
| 267 | if (isset($ftrs['showGroupingCounter'])) { |
||
| 268 | $sReturn .= $this->updateDivTitleName($remindGroupValue, $groupCounter); |
||
| 269 | $groupCounter = 0; |
||
| 270 | } |
||
| 271 | $sReturn .= '</div>'; |
||
| 272 | } |
||
| 273 | $sReturn .= '<div class="tabbertab'; |
||
| 274 | if (isset($ftrs['grouping_default_tab'])) { |
||
| 275 | $sReturn .= ($ftrs['grouping_default_tab'] == $value ? ' tabbertabdefault' : ''); |
||
| 276 | } |
||
| 277 | $sReturn .= '" id="tab_' . $this->cleanStringForId($value) . '" ' |
||
| 278 | . 'title="' . $value . '">' |
||
| 279 | . $tbl['Def'] . $tbl['Head'] . $tbl['Header']; |
||
| 280 | break; |
||
| 281 | } |
||
| 282 | $remindGroupValue = $value; |
||
| 283 | } |
||
| 284 | } |
||
| 285 | } |
||
| 286 | if (isset($ftrs['grouping_cell'])) { |
||
| 287 | if ($ftrs['grouping_cell_type'] == 'tab') { |
||
| 288 | if (isset($ftrs['showGroupingCounter'])) { |
||
| 289 | $groupCounter++; |
||
| 290 | } |
||
| 291 | } |
||
| 292 | } |
||
| 293 | $sReturn .= $tbl['tr_Color']; |
||
| 294 | // Action column |
||
| 295 | if (isset($ftrs['actions'])) { |
||
| 296 | $sReturn .= '<td style="white-space:nowrap;">'; |
||
| 297 | $action_argument = 0; |
||
| 298 | if (isset($ftrs['actions']['key'])) { |
||
| 299 | $action_key = $ftrs['actions']['key']; |
||
| 300 | } else { |
||
| 301 | $action_key = 'view'; |
||
| 302 | } |
||
| 303 | if (isset($ftrs['action_prefix'])) { |
||
| 304 | $actPrfx = $ftrs['action_prefix'] . '&'; |
||
| 305 | $action_key = 'view2'; |
||
| 306 | } else { |
||
| 307 | $actPrfx = ''; |
||
| 308 | } |
||
| 309 | foreach ($ftrs['actions'] as $key => $value) { |
||
| 310 | if ($action_argument != 0) { |
||
| 311 | $sReturn .= ' '; |
||
| 312 | } |
||
| 313 | switch ($key) { |
||
| 314 | case 'checkbox': |
||
| 315 | $checkboxName = $value . '[]'; |
||
| 316 | $checkboxNameS = $value; |
||
| 317 | $sReturn .= ' <input type="checkbox" name="' . $checkboxName |
||
| 318 | . '" id="n' . $aElements[$rCntr][$value] |
||
| 319 | . '" value="' . $aElements[$rCntr][$value] . '" '; |
||
| 320 | if (isset($_REQUEST[$checkboxNameS])) { |
||
| 321 | if (is_array($_REQUEST[$checkboxNameS])) { |
||
| 322 | if (in_array($aElements[$rCntr][$value], $_REQUEST[$checkboxNameS])) { |
||
| 323 | $sReturn .= 'checked="checked" '; |
||
| 324 | } |
||
| 325 | } else { |
||
| 326 | if ($aElements[$rCntr][$value] == $_REQUEST[$checkboxNameS]) { |
||
| 327 | $sReturn .= 'checked="checked" '; |
||
| 328 | } |
||
| 329 | } |
||
| 330 | } |
||
| 331 | if (strpos($_REQUEST['view'], 'multiEdit') !== false) { |
||
| 332 | $sReturn .= 'disabled="disabled" '; |
||
| 333 | } |
||
| 334 | $sReturn .= '/>'; |
||
| 335 | break; |
||
| 336 | case 'checkbox_inlineEdit': |
||
| 337 | $checkboxName = $value . '[]'; |
||
| 338 | $checkboxNameS = $value; |
||
| 339 | $sReturn .= ' <input type="checkbox" name="' . $checkboxName |
||
| 340 | . '" id="n' . $aElements[$rCntr][$value] . '" value="' |
||
| 341 | . $aElements[$rCntr][$value] . '"/>'; |
||
| 342 | break; |
||
| 343 | case 'edit': |
||
| 344 | $edt = ''; |
||
| 345 | if (isset($ftrs['NoAjaxEditing'])) { |
||
| 346 | $edt .= $_SERVER['PHP_SELF'] . '?' . $actPrfx |
||
| 347 | . $action_key . '=' . $value[0] . '&'; |
||
| 348 | $iActArgs = count($value[1]); |
||
| 349 | for ($cntr2 = 0; $cntr2 < $iActArgs; $cntr2++) { |
||
| 350 | $edt .= $value[1][$cntr2] . '=' . $aElements[$rCntr][$value[1][$cntr2]]; |
||
| 351 | } |
||
| 352 | $sReturn .= '<a href="' . $edt . '"><i class="fa fa-pencil"> </i></a>'; |
||
| 353 | View Code Duplication | } else { |
|
| 354 | $edt .= 'javascript:loadAE(\'' . $_SERVER['PHP_SELF'] . '?' |
||
| 355 | . $actPrfx . $action_key . '=' . $value[0] . '&'; |
||
| 356 | $iActArgs = count($value[1]); |
||
| 357 | for ($cntr2 = 0; $cntr2 < $iActArgs; $cntr2++) { |
||
| 358 | $edt .= $value[1][$cntr2] . '=' . $aElements[$rCntr][$value[1][$cntr2]]; |
||
| 359 | } |
||
| 360 | $edt .= '\');'; |
||
| 361 | $sReturn .= '<a href="#" onclick="' . $edt . '">' |
||
| 362 | . '<i class="fa fa-pencil"> </i></a>'; |
||
| 363 | } |
||
| 364 | break; |
||
| 365 | case 'list2': |
||
| 366 | $edt = ''; |
||
| 367 | if (isset($ftrs['NoAjaxEditing'])) { |
||
| 368 | $sReturn .= '<a href="?' . $actPrfx . $action_key . '=' . $value[0] . '&'; |
||
| 369 | $iActArgs = count($value[1]); |
||
| 370 | for ($cntr2 = 0; $cntr2 < $iActArgs; $cntr2++) { |
||
| 371 | $sReturn .= $value[1][$cntr2] . '=' . $aElements[$rCntr][$value[1][$cntr2]]; |
||
| 372 | } |
||
| 373 | $sReturn .= '"><i class="fa fa-list"> </i></a>'; |
||
| 374 | View Code Duplication | } else { |
|
| 375 | $edt .= 'javascript:loadAE(\'' . $_SERVER['PHP_SELF'] . '?' |
||
| 376 | . $actPrfx . $action_key . '=' . $value[0] . '&'; |
||
| 377 | $iActArgs = count($value[1]); |
||
| 378 | for ($cntr2 = 0; $cntr2 < $iActArgs; $cntr2++) { |
||
| 379 | $edt .= $value[1][$cntr2] . '=' . $aElements[$rCntr][$value[1][$cntr2]]; |
||
| 380 | } |
||
| 381 | $edt .= '\');'; |
||
| 382 | $sReturn .= '<a href="#" onclick="' . $edt . '">' |
||
| 383 | . '<i class="fa fa-list"> </i></a>'; |
||
| 384 | } |
||
| 385 | break; |
||
| 386 | case 'delete': |
||
| 387 | $sReturn .= '<a href="javascript:setQuest(\'' . $value[0] . '\',\''; |
||
| 388 | $iActArgs = count($value[1]); |
||
| 389 | for ($cntr2 = 0; $cntr2 < $iActArgs; $cntr2++) { |
||
| 390 | $sReturn .= $value[1][$cntr2] . '=' . $aElements[$rCntr][$value[1][$cntr2]]; |
||
| 391 | } |
||
| 392 | $sReturn .= '\');"><i class="fa fa-times"> </i></a>'; |
||
| 393 | break; |
||
| 394 | } |
||
| 395 | $action_argument += 1; |
||
| 396 | } |
||
| 397 | $sReturn .= '</td>'; |
||
| 398 | } |
||
| 399 | // Regular columns |
||
| 400 | $sReturn .= $this->setTableCell($row_current, $ftrs); |
||
| 401 | // Computed columns |
||
| 402 | if (isset($ftrs['computed_columns'])) { |
||
| 403 | foreach ($ftrs['computed_columns'] as $key => $value) { |
||
| 404 | if ($value[0] == '%') { |
||
| 405 | $dec = $value[2] + 2; |
||
| 406 | } else { |
||
| 407 | $dec = $value[2]; |
||
| 408 | } |
||
| 409 | switch ($value[1]) { |
||
| 410 | case '/': |
||
| 411 | // next variable is only to avoid a long line |
||
| 412 | $shorter = [ |
||
| 413 | $aElements[$rCntr][$value[3]], |
||
| 414 | $aElements[$rCntr][$value[4]], |
||
| 415 | ]; |
||
| 416 | $aElements[$rCntr][$key] = $this->setDividedResult($shorter[0], $shorter[1], $dec); |
||
| 417 | break; |
||
| 418 | case '+': |
||
| 419 | // next variable is only to avoid a long line |
||
| 420 | $iTemp = $this->setArrayValuesAsKey([ |
||
| 421 | $value[0], |
||
| 422 | $value[1], |
||
| 423 | $value[2] |
||
| 424 | ]); |
||
| 425 | $aTemp = array_diff($value, $iTemp); |
||
| 426 | $aElements[$rCntr][$key] = 0; |
||
| 427 | foreach ($aTemp as $sValue) { |
||
| 428 | $aElements[$rCntr][$key] += $aElements[$rCntr][$sValue]; |
||
| 429 | } |
||
| 430 | break; |
||
| 431 | default: |
||
| 432 | $row_computed[$key] = ''; |
||
| 433 | break; |
||
| 434 | } |
||
| 435 | if ($value[0] == '%') { |
||
| 436 | $row_computed[$key] = ($aElements[$rCntr][$key] * 100); |
||
| 437 | $dec -= 2; |
||
| 438 | } else { |
||
| 439 | $row_computed[$key] = $aElements[$rCntr][$key]; |
||
| 440 | } |
||
| 441 | $decimals[$key] = $dec; |
||
| 442 | } |
||
| 443 | // displaying them |
||
| 444 | $sReturn .= $this->setTableCell($row_computed, ['decimals' => $decimals]); |
||
| 445 | } |
||
| 446 | $sReturn .= '</tr>'; |
||
| 447 | } |
||
| 448 | View Code Duplication | if (isset($iStartingPageRecord)) { |
|
| 449 | $pgn = $this->setPagination($ftrs['limits'][0], $ftrs['limits'][1], $ftrs['limits'][2]); |
||
| 450 | $sReturn .= '<tr>' . $this->setStringIntoTag($pgn, 'th', ['colspan' => $iTableColumns]) . '</tr>'; |
||
| 451 | } |
||
| 452 | $sReturn .= '</tbody></table>'; |
||
| 453 | if ($ftrs['grouping_cell_type'] == 'tab') { |
||
| 454 | if (isset($ftrs['showGroupingCounter'])) { |
||
| 455 | $sReturn .= $this->updateDivTitleName($remindGroupValue, $groupCounter); |
||
| 456 | } |
||
| 457 | $sReturn .= '</div><!-- from ' . $remindGroupValue . ' -->'; |
||
| 458 | if (!isset($ftrs['noGlobalTab'])) { |
||
| 459 | $sReturn .= '</div><!-- from global tab -->'; |
||
| 460 | } |
||
| 461 | } |
||
| 462 | if (isset($ftrs['actions']['checkbox'])) { |
||
| 463 | if (strpos($_REQUEST['view'], 'multiEdit') === false) { |
||
| 464 | $sReturn .= '<a href="#" onclick="javascript:checking(\'' . $checkboxFormId |
||
| 465 | . '\',\'' . $checkboxName . '\',true);">Check All</a> ' |
||
| 466 | . '<a href="#" onclick="javascript:checking(\'' . $checkboxFormId |
||
| 467 | . '\',\'' . $checkboxName . '\',false);">Uncheck All</a> ' |
||
| 468 | . '<input type="hidden" name="action" value="multiEdit_' . $checkboxNameS . '" />'; |
||
| 469 | View Code Duplication | if (isset($ftrs['hiddenInput'])) { |
|
| 470 | if (is_array($ftrs['hiddenInput'])) { |
||
| 471 | foreach ($ftrs['hiddenInput'] as $valueF) { |
||
| 472 | $sReturn .= '<input type="hidden" name="' . $valueF |
||
| 473 | . '" value="' . $_REQUEST[$valueF] . '" />'; |
||
| 474 | } |
||
| 475 | } else { |
||
| 476 | $sReturn .= '<input type="hidden" name="' . $ftrs['hiddenInput'] |
||
| 477 | . '" value="' . $_REQUEST[$ftrs['hiddenInput']] . '" />'; |
||
| 478 | } |
||
| 479 | } |
||
| 480 | $sReturn .= '<input style="margin: 0 3em 0 3em;" type="submit" ' . 'value="Edit selected" />'; |
||
| 481 | } |
||
| 482 | $sReturn .= '</form>'; |
||
| 483 | } |
||
| 484 | if (isset($ftrs['actions']['checkbox_inlineEdit'])) { |
||
| 485 | $sReturn .= '<a href="#" onclick="javascript:checking(\'' . $checkboxFormId |
||
| 486 | . '\',\'' . $checkboxName . '\',true);">Check All</a> ' |
||
| 487 | . '<a href="#" onclick="javascript:checking(\'' . $checkboxFormId |
||
| 488 | . '\',\'' . $checkboxName . '\',false);">Uncheck All</a> '; |
||
| 489 | if (isset($ftrs['visibleInput'])) { |
||
| 490 | $sReturn .= $ftrs['visibleInput']; |
||
| 491 | } |
||
| 492 | $sReturn .= '<input type="hidden" name="view" value="save_' . $checkboxNameS . '" />'; |
||
| 493 | View Code Duplication | if (isset($ftrs['hiddenInput'])) { |
|
| 494 | if (is_array($ftrs['hiddenInput'])) { |
||
| 495 | foreach ($ftrs['hiddenInput'] as $valueF) { |
||
| 496 | $sReturn .= '<input type="hidden" name="' . $valueF |
||
| 497 | . '" value="' . $_REQUEST[$valueF] . '" />'; |
||
| 498 | } |
||
| 499 | } else { |
||
| 500 | $sReturn .= '<input type="hidden" name="' . $ftrs['hiddenInput'] |
||
| 501 | . '" value="' . $_REQUEST[$ftrs['hiddenInput']] . '" />'; |
||
| 502 | } |
||
| 503 | } |
||
| 504 | $sReturn .= '<input style="margin: 0 3em 0 3em;" type="submit" value="Store the modification" />'; |
||
| 505 | $sReturn .= '</form>'; |
||
| 506 | } |
||
| 507 | return $sReturn; |
||
| 508 | } |
||
| 509 | |||
| 784 |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: