Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3827e3e

Browse files
committed
Make PHPcs happy.
Signed-off-by: Hugues Peccatte <[email protected]>
1 parent 10f5d6e commit 3827e3e

5 files changed

Lines changed: 42 additions & 28 deletions

File tree

libraries/DatabaseInterface.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3115,8 +3115,8 @@ public function getSystemDatabase()
31153115
/**
31163116
* Get a table with database name and table name
31173117
*
3118-
* @param $db_name
3119-
* @param $table_name
3118+
* @param string $db_name DB name
3119+
* @param string $table_name Table name
31203120
*
31213121
* @return PMA_Table
31223122
*/

libraries/Table.class.php

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ class PMA_Table
7474
/**
7575
* Constructor
7676
*
77-
* @param string $table_name table name
78-
* @param string $db_name database name
79-
* @param PMA_DatabaseInterface $dbi database interface for the table
77+
* @param string $table_name table name
78+
* @param string $db_name database name
79+
* @param PMA_DatabaseInterface $dbi database interface for the table
8080
*/
8181
function __construct($table_name, $db_name, PMA_DatabaseInterface $dbi = null)
8282
{
@@ -1625,7 +1625,7 @@ protected function loadUiPrefs()
16251625
$server_id = $GLOBALS['server'];
16261626

16271627
// set session variable if it's still undefined
1628-
if (! isset($_SESSION['tmpval']['table_uiprefs'][$server_id][$this->_db_name][$this->_name])) {
1628+
if (!isset($_SESSION['tmpval']['table_uiprefs'][$server_id][$this->_db_name][$this->_name])) {
16291629
// check whether we can get from pmadb
16301630
$_SESSION['tmpval']['table_uiprefs'][$server_id][$this->_db_name]
16311631
[$this->_name] = $cfgRelation['uiprefswork']
@@ -1819,11 +1819,14 @@ public function getReservedColumnNames()
18191819
public function getNameAndTypeOfTheColumns()
18201820
{
18211821
$columns = array();
1822-
foreach ($this->_dbi->getColumnsFull($this->_db_name, $this->_name) as $row) {
1822+
foreach ($this->_dbi->getColumnsFull(
1823+
$this->_db_name, $this->_name
1824+
) as $row) {
18231825
if (preg_match('@^(set|enum)\((.+)\)$@i', $row['Type'], $tmp)) {
1824-
$tmp[2] = /*overload*/mb_substr(
1825-
preg_replace('@([^,])\'\'@', '\\1\\\'', ',' . $tmp[2]), 1
1826-
);
1826+
$tmp[2] = /*overload*/
1827+
mb_substr(
1828+
preg_replace('@([^,])\'\'@', '\\1\\\'', ',' . $tmp[2]), 1
1829+
);
18271830
$columns[$row['Field']] = $tmp[1] . '('
18281831
. str_replace(',', ', ', $tmp[2]) . ')';
18291832
} else {
@@ -1836,7 +1839,8 @@ public function getNameAndTypeOfTheColumns()
18361839
/**
18371840
* Get index with index name
18381841
*
1839-
* @param $index
1842+
* @param string $index Index name
1843+
*
18401844
* @return PMA_Index
18411845
*/
18421846
public function getIndex($index)
@@ -1890,7 +1894,9 @@ public function getSqlQueryForIndexCreateOrEdit($index, &$error)
18901894
case 'INDEX':
18911895
case 'SPATIAL':
18921896
if ($index->getName() == 'PRIMARY') {
1893-
$error = PMA_Message::error(__('Can\'t rename index to PRIMARY!'));
1897+
$error = PMA_Message::error(
1898+
__('Can\'t rename index to PRIMARY!')
1899+
);
18941900
}
18951901
$sql_query .= sprintf(
18961902
' ADD %s ',

tbl_chart.php

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,17 @@
140140
/**
141141
* Displays the page
142142
*/
143-
$response->addHTML(Template::get('tbl_chart')->render(
144-
array(
145-
'url_query' => $url_query,
146-
'url_params' => $url_params,
147-
'keys' => $keys,
148-
'fields_meta' => $fields_meta,
149-
'numeric_types' => $numeric_types,
150-
'numeric_column_count' => $numeric_column_count,
151-
'sql_query' => $sql_query
152-
)
153-
));
143+
$response->addHTML(
144+
Template::get('tbl_chart')
145+
->render(
146+
array(
147+
'url_query' => $url_query,
148+
'url_params' => $url_params,
149+
'keys' => $keys,
150+
'fields_meta' => $fields_meta,
151+
'numeric_types' => $numeric_types,
152+
'numeric_column_count' => $numeric_column_count,
153+
'sql_query' => $sql_query
154+
)
155+
)
156+
);

tbl_indexes.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@
4747
PMA_Response::getInstance()->addJSON(
4848
'sql_data',
4949
PMA\Template::get('preview_sql')
50-
->render(array(
51-
'query_data' => $sql_query
52-
))
50+
->render(
51+
array(
52+
'query_data' => $sql_query
53+
)
54+
)
5355
);
5456
} elseif (!$error) {
5557

@@ -121,7 +123,8 @@
121123
}
122124

123125
$response = PMA_Response::getInstance();
124-
$response->addHTML(PMA\Template::get('index_form')
126+
$response->addHTML(
127+
PMA\Template::get('index_form')
125128
->render(
126129
array(
127130
'fields' => $fields,

test/libraries/PMA_tbl_indexes_test.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ public function testPMAGetHtmlForIndexForm()
122122
* );
123123
* $add_fields = 3;
124124
*
125-
* $html = PMA_getHtmlForIndexForm($fields, $index, $form_params, $add_fields);
125+
* $html = PMA_getHtmlForIndexForm(
126+
* $fields, $index, $form_params, $add_fields
127+
* );
126128
*
127129
* //PMA_URL_getHiddenInputs
128130
* $this->assertContains(

0 commit comments

Comments
 (0)