diff --git a/db_operations.php b/db_operations.php
index 2818864c6e..bed41307b5 100644
--- a/db_operations.php
+++ b/db_operations.php
@@ -66,7 +66,7 @@ if (strlen($db) && (! empty($_REQUEST['db_rename']) || ! empty($_REQUEST['db_cop
$tables_full = PMA_DBI_get_tables_full($db);
- require_once "libraries/plugin_interface.lib.php";
+ include_once "libraries/plugin_interface.lib.php";
// remove all foreign key constraints, otherwise we can get errors
$export_sql_plugin = PMA_getPlugin(
"export",
@@ -77,8 +77,8 @@ if (strlen($db) && (! empty($_REQUEST['db_rename']) || ! empty($_REQUEST['db_cop
'export_type' => 'database'
)
);
- $GLOBALS['sql_constraints_query_full_db'] =
- PMA_getSqlConstraintsQueryForFullDb(
+ $GLOBALS['sql_constraints_query_full_db']
+ = PMA_getSqlConstraintsQueryForFullDb(
$tables_full, $export_sql_plugin, $move, $db
);
diff --git a/db_structure.php b/db_structure.php
index 95c2fc4959..7d71d7562d 100644
--- a/db_structure.php
+++ b/db_structure.php
@@ -271,9 +271,9 @@ foreach ($tables as $keyname => $current_table) {
list($html_output, $odd_row) = PMA_getHtmlForStructureTableRow(
$i, $odd_row, $table_is_view, $current_table, $checked,
- $browse_table_label, $tracking_icon,$server_slave_status,
+ $browse_table_label, $tracking_icon, $server_slave_status,
$browse_table, $tbl_url_query, $search_table, $db_is_information_schema,
- $titles, $empty_table,$drop_query, $drop_message, $collation,
+ $titles, $empty_table, $drop_query, $drop_message, $collation,
$formatted_size, $unit, $overhead,
(isset ($create_time) ? $create_time : ''),
(isset ($update_time) ? $update_time : ''),
diff --git a/import.php b/import.php
index 70e471b07b..f34fa70c53 100644
--- a/import.php
+++ b/import.php
@@ -442,7 +442,7 @@ $sql_data = array('valid_sql' => array(), 'valid_queries' => 0);
if (! $error) {
// Check for file existance
- require_once("libraries/plugin_interface.lib.php");
+ include_once "libraries/plugin_interface.lib.php";
$import_plugin = PMA_getPlugin(
"import",
$format,
diff --git a/libraries/CommonFunctions.class.php b/libraries/CommonFunctions.class.php
index f90a508b0e..3f48a40825 100644
--- a/libraries/CommonFunctions.class.php
+++ b/libraries/CommonFunctions.class.php
@@ -3514,7 +3514,7 @@ class PMA_CommonFunctions
/* Optional escaping */
if (! is_null($escape)) {
if (is_array($escape)) {
- require_once $escape[2];
+ include_once $escape[2];
$escape_class = new $escape[1];
$escape_method = $escape[0];
}
diff --git a/libraries/Tracker.class.php b/libraries/Tracker.class.php
index 9d8c430dc5..052804f10e 100644
--- a/libraries/Tracker.class.php
+++ b/libraries/Tracker.class.php
@@ -267,7 +267,7 @@ class PMA_Tracker
}
// get Export SQL instance
- require_once "libraries/plugin_interface.lib.php";
+ include_once "libraries/plugin_interface.lib.php";
$export_sql_plugin = PMA_getPlugin(
"export",
"sql",
diff --git a/libraries/error.inc.php b/libraries/error.inc.php
index 22b7474ee9..7e3f8ae118 100644
--- a/libraries/error.inc.php
+++ b/libraries/error.inc.php
@@ -14,7 +14,7 @@ if (! defined('TESTSUITE')) {
header('Content-Type: text/html; charset=utf-8');
}
-include_once 'libraries/Response.class.php';
+require_once 'libraries/Response.class.php';
PMA_Response::getInstance()->disable();
?>
diff --git a/libraries/mult_submits.inc.php b/libraries/mult_submits.inc.php
index 3008805431..4fc5c747ee 100644
--- a/libraries/mult_submits.inc.php
+++ b/libraries/mult_submits.inc.php
@@ -496,7 +496,7 @@ if (!empty($submit_mult) && !empty($what)) {
} elseif ($query_type == 'drop_tbl') {
PMA_clearTransformations($db, $selected[$i]);
} else if ($query_type == 'drop_fld') {
- PMA_clearTransformations($db, $table ,$selected[$i]);
+ PMA_clearTransformations($db, $table, $selected[$i]);
}
} // end if
diff --git a/libraries/replication_gui.lib.php b/libraries/replication_gui.lib.php
index 3cad0da787..d2bd825444 100644
--- a/libraries/replication_gui.lib.php
+++ b/libraries/replication_gui.lib.php
@@ -150,8 +150,7 @@ function PMA_replication_print_status_table($type, $hidden = false, $title = tru
'Replicate_Wild_Do_Table', 'Replicate_Wild_Ignore_Table');
if (in_array($variable, $variables_wrap)) {
echo str_replace(',', ', ', ${"server_{$type}_replication"}[0][$variable]);
- }
- else {
+ } else {
echo ${"server_{$type}_replication"}[0][$variable];
}
echo '';
diff --git a/libraries/transformations.lib.php b/libraries/transformations.lib.php
index 561406e0eb..1eaddb5a69 100644
--- a/libraries/transformations.lib.php
+++ b/libraries/transformations.lib.php
@@ -146,7 +146,7 @@ function PMA_getTransformationDescription($file, $html_formatted = true)
$class_name = $class_name[0];
// include and instantiate the class
- require_once 'libraries/plugins/transformations/' . $file;
+ include_once 'libraries/plugins/transformations/' . $file;
return $class_name::getInfo();
}
@@ -268,7 +268,7 @@ function PMA_setMIME($db, $table, $key, $mimetype, $transformation,
$transformation = strtolower($transformation);
$transformation = str_replace(".class.php", ".inc.php", $transformation);
$last_pos = strrpos($transformation, "_");
- $transformation = substr($transformation , 0, $last_pos) . "_"
+ $transformation = substr($transformation, 0, $last_pos) . "_"
. substr($transformation, $last_pos);
$test_qry = '
diff --git a/sql.php b/sql.php
index c2d96aea6f..67fe696e9f 100644
--- a/sql.php
+++ b/sql.php
@@ -773,7 +773,7 @@ if ((0 == $num_rows && 0 == $unlim_num_rows) || $is_affected) {
|| ($analyzed_sql[0]['querytype'] == 'DROP'))
) {
- require_once 'libraries/transformations.lib.php';
+ include_once 'libraries/transformations.lib.php';
if ($analyzed_sql[0]['querytype'] == 'ALTER') {
if (stripos($analyzed_sql[0]['unsorted_query'], 'DROP') !== false) {
@@ -1275,8 +1275,8 @@ function PMA_getNewDatabase($sql, $databases)
{
$db = '';
// loop through all the databases
- foreach ($databases as $database){
- if (strpos($sql,$database['SCHEMA_NAME']) !== false) {
+ foreach ($databases as $database) {
+ if (strpos($sql, $database['SCHEMA_NAME']) !== false) {
$db = $database;
break;
}
@@ -1301,7 +1301,7 @@ function PMA_getTableNameBySQL($sql, $tables)
// loop through all the tables in the database
foreach ($tables as $tbl) {
- if (strpos($sql,$tbl)) {
+ if (strpos($sql, $tbl)) {
$table .= ' ' . $tbl;
}
}
diff --git a/tbl_change.php b/tbl_change.php
index ce3237db87..3c60e786db 100644
--- a/tbl_change.php
+++ b/tbl_change.php
@@ -343,14 +343,17 @@ foreach ($rows as $row_id => $current_row) {
$html_output .= '
' . "\n";
// Will be used by js/tbl_change.js to set the default value
// for the "Continue insertion" feature
- $html_output .= '' . $special_chars . '';
+ $html_output .= ''
+ . $special_chars . '';
$html_output .= PMA_getValueColumn(
- $column, $backup_field, $column_name_appendix, $unnullify_trigger,$tabindex,
- $tabindex_for_value, $idindex, $data,$special_chars, $foreignData, $odd_row,
- $paramTableDbArray,$rownumber_param, $titles, $text_dir, $special_chars_encoded,
- $vkey,$is_upload, $biggest_max_file_size, $default_char_editing,
- $no_support_types, $gis_data_types, $extracted_columnspec);
+ $column, $backup_field, $column_name_appendix, $unnullify_trigger,
+ $tabindex, $tabindex_for_value, $idindex, $data, $special_chars,
+ $foreignData, $odd_row, $paramTableDbArray, $rownumber_param, $titles,
+ $text_dir, $special_chars_encoded, $vkey, $is_upload,
+ $biggest_max_file_size, $default_char_editing,
+ $no_support_types, $gis_data_types, $extracted_columnspec
+ );
$html_output .= ' | '
. '';
diff --git a/tbl_operations.php b/tbl_operations.php
index f0373e9549..6de818bac3 100644
--- a/tbl_operations.php
+++ b/tbl_operations.php
@@ -118,8 +118,7 @@ if (isset($_REQUEST['submitoptions'])) {
) = PMA_setGlobalVariablesForEngine($tbl_storage_engine);
if ($is_aria) {
- $transactional =
- (isset($transactional) && $transactional == '0')
+ $transactional = (isset($transactional) && $transactional == '0')
? '0'
: '1';
$page_checksum = (isset($page_checksum)) ? $page_checksum : '';
@@ -325,8 +324,8 @@ if (! (isset($db_is_information_schema) && $db_is_information_schema)) {
($tbl_is_view
? __('View %s has been dropped')
: __('Table %s has been dropped')
- )
- , htmlspecialchars($table)
+ ),
+ htmlspecialchars($table)
),
// table name is needed to avoid running
// PMA_relationsCleanupDatabase() on the whole db later
diff --git a/tbl_structure.php b/tbl_structure.php
index 4de2e5528f..723dc5c29c 100644
--- a/tbl_structure.php
+++ b/tbl_structure.php
@@ -315,7 +315,7 @@ foreach ($fields as $row) {
PMA_getHtmlTableStructureRow($row, $rownum, $checked,
$displayed_field_name, $type_nowrap, $extracted_columnspec,
$type_mime, $field_charset, $attribute, $tbl_is_view,
- $db_is_information_schema,$url_query, $field_encoded, $titles, $table
+ $db_is_information_schema, $url_query, $field_encoded, $titles, $table
)
);
diff --git a/tbl_tracking.php b/tbl_tracking.php
index da28b99b7b..cb434fb781 100644
--- a/tbl_tracking.php
+++ b/tbl_tracking.php
@@ -292,8 +292,8 @@ if (isset($_REQUEST['snapshot'])) {
// Print SQL code
echo $common_functions->getMessage(
sprintf(
- __('Version %s snapshot (SQL code)')
- , htmlspecialchars($_REQUEST['version'])
+ __('Version %s snapshot (SQL code)'),
+ htmlspecialchars($_REQUEST['version'])
),
$drop_create_statements
);
diff --git a/test/classes/PMA_List_Database_test.php b/test/classes/PMA_List_Database_test.php
index ea91f3d25d..8a592021ae 100644
--- a/test/classes/PMA_List_Database_test.php
+++ b/test/classes/PMA_List_Database_test.php
@@ -135,7 +135,7 @@ class PMA_List_Database_test extends PHPUnit_Framework_TestCase
$GLOBALS['cfg']['LeftFrameDBSeparator'] = array('|',',');
$this->assertEquals(
- $this->object->getHtmlListGrouped(true,5,5),
+ $this->object->getHtmlListGrouped(true, 5, 5),
''
);
diff --git a/test/classes/PMA_Theme_Manager_test.php b/test/classes/PMA_Theme_Manager_test.php
index f76d49e9aa..7e20d743cd 100644
--- a/test/classes/PMA_Theme_Manager_test.php
+++ b/test/classes/PMA_Theme_Manager_test.php
@@ -79,9 +79,9 @@ class PMA_Theme_Manager_test extends PHPUnit_Framework_TestCase
$this->assertNull(
$tm->makeBc()
);
- $this->assertEquals($GLOBALS['theme'],'pmahomme');
- $this->assertEquals($GLOBALS['pmaThemePath'],'./themes/pmahomme');
- $this->assertEquals($GLOBALS['pmaThemeImage'],'./themes/pmahomme/img/');
+ $this->assertEquals($GLOBALS['theme'], 'pmahomme');
+ $this->assertEquals($GLOBALS['pmaThemePath'], './themes/pmahomme');
+ $this->assertEquals($GLOBALS['pmaThemeImage'], './themes/pmahomme/img/');
}
diff --git a/test/classes/PMA_Theme_test.php b/test/classes/PMA_Theme_test.php
index 6a7c548778..4570ce885f 100644
--- a/test/classes/PMA_Theme_test.php
+++ b/test/classes/PMA_Theme_test.php
@@ -32,7 +32,7 @@ class PMA_ThemeTest extends PHPUnit_Framework_TestCase
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['cfg']['SQP']['fmtColor'] = array('fake' => 'red');
$GLOBALS['text_dir'] = 'ltr';
- require 'themes/pmahomme/layout.inc.php';
+ include 'themes/pmahomme/layout.inc.php';
$_SESSION[' PMA_token '] = 'token';
$GLOBALS['lang'] = 'en';
$GLOBALS['server'] = '99';
@@ -254,7 +254,7 @@ class PMA_ThemeTest extends PHPUnit_Framework_TestCase
'14px'
);
- $GLOBALS['PMA_Config']->set('fontsize','12px');
+ $GLOBALS['PMA_Config']->set('fontsize', '12px');
$this->assertEquals(
$this->object->getFontSize(),
'12px'
diff --git a/test/classes/gis/PMA_GIS_Linestring_test.php b/test/classes/gis/PMA_GIS_Linestring_test.php
index cbd00e5229..6a12feaa85 100644
--- a/test/classes/gis/PMA_GIS_Linestring_test.php
+++ b/test/classes/gis/PMA_GIS_Linestring_test.php
@@ -172,17 +172,20 @@ class PMA_GIS_LinestringTest extends PMA_GIS_GeomTest
* @param type $image
* @param type $output
*
- *@dataProvider providerForPrepareRowAsPng
+ * @dataProvider providerForPrepareRowAsPng
+ * @return void
*/
- public function testPrepareRowAsPng($spatial, $label, $line_color, $scale_data, $image, $output)
- {
-
- $return = $this->object->prepareRowAsPng($spatial, $label, $line_color, $scale_data, $image);
+ public function testPrepareRowAsPng($spatial, $label, $line_color,
+ $scale_data, $image, $output
+ ) {
+ $return = $this->object->prepareRowAsPng(
+ $spatial, $label, $line_color, $scale_data, $image
+ );
$this->assertTrue(true);
}
- public function providerForPrepareRowAsPng(){
-
+ public function providerForPrepareRowAsPng()
+ {
return array(
array(
'LINESTRING(12 35,48 75,69 23,25 45,14 53,35 78)',
@@ -194,10 +197,9 @@ class PMA_GIS_LinestringTest extends PMA_GIS_GeomTest
'scale' => 2,
'height' => 150
),
- imagecreatetruecolor('120','150'),
+ imagecreatetruecolor('120', '150'),
''
)
-
);
}
@@ -209,17 +211,20 @@ class PMA_GIS_LinestringTest extends PMA_GIS_GeomTest
* @param type $scale_data
* @param type $pdf
*
- *@dataProvider providerForPrepareRowAsPdf
+ * @dataProvider providerForPrepareRowAsPdf
+ * @return void
*/
- public function testPrepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf)
- {
-
- $return = $this->object->prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf);
+ public function testPrepareRowAsPdf($spatial, $label, $line_color,
+ $scale_data, $pdf
+ ) {
+ $return = $this->object->prepareRowAsPdf(
+ $spatial, $label, $line_color, $scale_data, $pdf
+ );
$this->assertTrue($return instanceof TCPDF);
}
- public function providerForPrepareRowAsPdf(){
-
+ public function providerForPrepareRowAsPdf()
+ {
return array(
array(
'LINESTRING(12 35,48 75,69 23,25 45,14 53,35 78)',
@@ -244,18 +249,20 @@ class PMA_GIS_LinestringTest extends PMA_GIS_GeomTest
* @param type $scale_data
* @param type $output
*
- *@dataProvider providerForPrepareRowAsSvg
+ * @dataProvider providerForPrepareRowAsSvg
+ * @return void
*/
- public function testPrepareRowAsSvg($spatial, $label, $line_color, $scale_data, $output)
- {
-
- $string = $this->object->prepareRowAsSvg($spatial, $label, $line_color, $scale_data);
+ public function testPrepareRowAsSvg($spatial, $label, $line_color,
+ $scale_data, $output
+ ) {
+ $string = $this->object->prepareRowAsSvg(
+ $spatial, $label, $line_color, $scale_data
+ );
$this->assertEquals(1, preg_match($output, $string));
- //$this->assertEquals($this->object->prepareRowAsSvg($spatial, $label, $line_color, $scale_data) , $output);
}
- public function providerForPrepareRowAsSvg(){
-
+ public function providerForPrepareRowAsSvg()
+ {
return array(
array(
'LINESTRING(12 35,48 75,69 23,25 45,14 53,35 78)',
@@ -281,16 +288,22 @@ class PMA_GIS_LinestringTest extends PMA_GIS_GeomTest
* @param type $scale_data
* @param type $output
*
- *@dataProvider providerForPrepareRowAsOl
+ * @dataProvider providerForPrepareRowAsOl
+ * @return void
*/
- public function testPrepareRowAsOl($spatial, $srid, $label, $line_color, $scale_data, $output)
- {
-
- $this->assertEquals($this->object->prepareRowAsOl($spatial, $srid, $label, $line_color, $scale_data) , $output);
+ public function testPrepareRowAsOl($spatial, $srid, $label,
+ $line_color, $scale_data, $output
+ ) {
+ $this->assertEquals(
+ $this->object->prepareRowAsOl(
+ $spatial, $srid, $label, $line_color, $scale_data
+ ),
+ $output
+ );
}
- public function providerForPrepareRowAsOl(){
-
+ public function providerForPrepareRowAsOl()
+ {
return array(
array(
'LINESTRING(12 35,48 75,69 23,25 45,14 53,35 78)',
diff --git a/test/libraries/PMA_bookmark_test.php b/test/libraries/PMA_bookmark_test.php
index 9aa3775ca8..1cf7ab3ed1 100644
--- a/test/libraries/PMA_bookmark_test.php
+++ b/test/libraries/PMA_bookmark_test.php
@@ -45,7 +45,7 @@ class PMA_bookmark_test extends PHPUnit_Framework_TestCase
$GLOBALS['cfg']['Server']['bookmarktable'] = 'pma_bookmark';
$GLOBALS['server'] = 1;
- require_once 'libraries/bookmark.lib.php';
+ include_once 'libraries/bookmark.lib.php';
}
/**
* Test for PMA_Bookmark_getParams
diff --git a/test/libraries/PMA_zip_extension_test.php b/test/libraries/PMA_zip_extension_test.php
index 358c5bb57c..54049a8ee7 100644
--- a/test/libraries/PMA_zip_extension_test.php
+++ b/test/libraries/PMA_zip_extension_test.php
@@ -1,6 +1,6 @@
assertEquals(
PMA_getZipContents($file, $specific_entry),
$output
@@ -30,8 +34,11 @@ class PMA_zip_extension_test extends PHPUnit_Framework_TestCase {
/**
* Provider for testGetZipContents
+ *
+ * @return array
*/
- public function providerForTestGetZipContents(){
+ public function providerForTestGetZipContents()
+ {
return array(
array(
'./test/test_data/test.zip',
@@ -53,13 +60,17 @@ class PMA_zip_extension_test extends PHPUnit_Framework_TestCase {
}
/**
+ * Test Find file in Zip Archive
+ *
* @param string $file_regexp regular expression for the file name to match
* @param string $file zip archive
- * @param $output
+ * @param mixed $output expected output
*
* @dataProvider providerForTestFindFileFromZipArchive
+ * @return void
*/
- public function testFindFileFromZipArchive($file_regexp, $file, $output){
+ public function testFindFileFromZipArchive($file_regexp, $file, $output)
+ {
$this->assertEquals(
PMA_findFileFromZipArchive($file_regexp, $file),
$output
@@ -68,8 +79,11 @@ class PMA_zip_extension_test extends PHPUnit_Framework_TestCase {
/**
* Provider for testFindFileFromZipArchive
+ *
+ * @return void
*/
- public function providerForTestFindFileFromZipArchive(){
+ public function providerForTestFindFileFromZipArchive()
+ {
return array(
array(
'/test/',
@@ -81,8 +95,11 @@ class PMA_zip_extension_test extends PHPUnit_Framework_TestCase {
/**
* Test for PMA_getNoOfFilesInZip
+ *
+ * @return void
*/
- public function testGetNoOfFilesInZip(){
+ public function testGetNoOfFilesInZip()
+ {
$this->assertEquals(
PMA_getNoOfFilesInZip('./test/test_data/test.zip'),
1
@@ -91,10 +108,15 @@ class PMA_zip_extension_test extends PHPUnit_Framework_TestCase {
/**
* Test for PMA_zipExtract
+ *
+ * @return void
*/
- public function testZipExtract(){
+ public function testZipExtract()
+ {
$this->assertEquals(
- PMA_zipExtract('./test/test_data/test.zip', './test/test_data/', 'wrongName'),
+ PMA_zipExtract(
+ './test/test_data/test.zip', './test/test_data/', 'wrongName'
+ ),
true
);
}
@@ -102,12 +124,14 @@ class PMA_zip_extension_test extends PHPUnit_Framework_TestCase {
/**
* Test for PMA_getZipError
*
- * @param $code error code
- * @param $output
+ * @param int $code error code
+ * @param mixed $output expected output
*
* @dataProvider providerForTestGetZipError
+ * @return void
*/
- public function testGetZipError($code, $output){
+ public function testGetZipError($code, $output)
+ {
$this->assertEquals(
PMA_getZipError($code),
$output
@@ -116,8 +140,11 @@ class PMA_zip_extension_test extends PHPUnit_Framework_TestCase {
/**
* Provider for testGetZipError
+ *
+ * @return array
*/
- public function providerForTestGetZipError(){
+ public function providerForTestGetZipError()
+ {
return array(
array(
1,
diff --git a/view_create.php b/view_create.php
index d5644fb275..b0b6e1d9ac 100644
--- a/view_create.php
+++ b/view_create.php
@@ -64,7 +64,7 @@ if (isset($_REQUEST['createview'])) {
if (PMA_DBI_try_query($sql_query)) {
- require_once './libraries/tbl_views.lib.php';
+ include_once './libraries/tbl_views.lib.php';
// If different column names defined for VIEW
$view_columns = array();