Skip to content

Commit

Permalink
Make PHPCS happy.
Browse files Browse the repository at this point in the history
Return null values instead of void.
Update PHPDoc.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
  • Loading branch information
Tithugues committed Jul 28, 2015
1 parent bce6061 commit 2efdf5f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions libraries/config/FormDisplay.class.php
Expand Up @@ -363,7 +363,7 @@ public function getDisplay(
* @param array &$js_default array which stores JavaScript code
* to be displayed
*
* @return string|void HTML for input field
* @return string HTML for input field
*/
private function _displayFieldInput(
Form $form, $field, $system_path, $work_path,
Expand Down Expand Up @@ -421,14 +421,16 @@ private function _displayFieldInput(
// :group:end is changed to :group:end:{unique id} in Form class
$htmlOutput = '';
if (/*overload*/mb_substr($field, 7, 4) != 'end:') {
$htmlOutput .= PMA_displayGroupHeader(/*overload*/mb_substr($field, 7));
$htmlOutput .= PMA_displayGroupHeader(
/*overload*/mb_substr($field, 7)
);
} else {
PMA_displayGroupFooter();
}
return $htmlOutput;
case 'NULL':
trigger_error("Field $system_path has no type", E_USER_WARNING);
return;
return null;
}

// detect password fields
Expand Down Expand Up @@ -488,7 +490,7 @@ public function displayErrors()
{
$this->_validate();
if (count($this->_errors) == 0) {
return;
return null;
}

$htmlOutput = '';
Expand Down
2 changes: 1 addition & 1 deletion libraries/config/FormDisplay.tpl.php
Expand Up @@ -356,7 +356,7 @@ function PMA_displayGroupHeader($header_text)

$_FormDisplayGroup++;
if (! $header_text) {
return;
return null;
}
$colspan = defined('PMA_SETUP')
? 3
Expand Down
Empty file.

0 comments on commit 2efdf5f

Please sign in to comment.