Merge pull request #13704 from mauriciofauth/array-type-hint

Add array type declarations
This commit is contained in:
Maurício Meneghini Fauth 2017-09-25 00:17:13 -03:00 committed by GitHub
commit 292c4099f8
150 changed files with 759 additions and 763 deletions

View File

@ -122,7 +122,7 @@ class Advisor
*
* @return Advisor
*/
public function setVariables($variables)
public function setVariables(array $variables)
{
$this->variables = $variables;
@ -161,7 +161,7 @@ class Advisor
*
* @return Advisor
*/
public function setParseResult($parseResult)
public function setParseResult(array $parseResult)
{
$this->parseResult = $parseResult;
@ -185,7 +185,7 @@ class Advisor
*
* @return Advisor
*/
public function setRunResult($runResult)
public function setRunResult(array $runResult)
{
$this->runResult = $runResult;
@ -357,7 +357,7 @@ class Advisor
*
* @return string[]
*/
public static function splitJustification($rule)
public static function splitJustification(array $rule)
{
$jst = preg_split('/\s*\|\s*/', $rule['justification'], 2);
if (count($jst) > 1) {
@ -374,7 +374,7 @@ class Advisor
*
* @return void
*/
public function addRule($type, $rule)
public function addRule($type, array $rule)
{
switch ($type) {
case 'notfired':
@ -430,7 +430,7 @@ class Advisor
*
* @return string Replacement value
*/
private function replaceLinkURL($matches)
private function replaceLinkURL(array $matches)
{
return 'href="' . Core::linkURL($matches[2]) . '" target="_blank" rel="noopener noreferrer"';
}
@ -442,7 +442,7 @@ class Advisor
*
* @return string Replacement value
*/
private function replaceVariable($matches)
private function replaceVariable(array $matches)
{
return '<a href="server_variables.php' . Url::getCommon(array('filter' => $matches[1]))
. '">' . htmlspecialchars($matches[1]) . '</a>';

View File

@ -166,11 +166,11 @@ class Bookmark
/**
* Replace the placeholders in the bookmark query with variables
*
* @param array $variables array of variables
* @param array $variables array of variables
*
* @return string query with variables applied
*/
public function applyVariables($variables)
public function applyVariables(array $variables)
{
// remove comments that encloses a variable placeholder
$query = preg_replace(
@ -232,7 +232,7 @@ class Bookmark
*
* @return Bookmark|false
*/
public static function createBookmark($bkm_fields, $all_users = false)
public static function createBookmark(array $bkm_fields, $all_users = false)
{
if (!(isset($bkm_fields['bkm_sql_query'])
&& strlen($bkm_fields['bkm_sql_query']) > 0

View File

@ -30,8 +30,8 @@ class BrowseForeigners
*
* @return string $html the generated html
*/
public static function getHtmlForOneKey($horizontal_count, $header, $keys,
$indexByKeyname, $descriptions, $indexByDescription, $current_value
public static function getHtmlForOneKey($horizontal_count, $header, array $keys,
$indexByKeyname, array $descriptions, $indexByDescription, $current_value
) {
$horizontal_count++;
$output = '';
@ -114,7 +114,7 @@ class BrowseForeigners
*
* @return string
*/
public static function getHtmlForRelationalFieldSelection($db, $table, $field, $foreignData,
public static function getHtmlForRelationalFieldSelection($db, $table, $field, array $foreignData,
$fieldkey, $current_value
) {
$gotopage = self::getHtmlForGotoPage($foreignData);
@ -277,7 +277,7 @@ class BrowseForeigners
/**
* Function to get html for show all case
*
* @param array $foreignData foreign data
* @param array|null $foreignData foreign data
*
* @return string
*/
@ -300,7 +300,7 @@ class BrowseForeigners
/**
* Function to get html for the goto page option
*
* @param array $foreignData foreign data
* @param array|null $foreignData foreign data
*
* @return string
*/

View File

@ -180,7 +180,7 @@ class CentralColumns
* @return string query string to insert the given column
* with definition into central list
*/
public static function getInsertQuery($column, $def, $db, $central_list_table)
public static function getInsertQuery($column, array $def, $db, $central_list_table)
{
$type = "";
$length = 0;
@ -224,7 +224,7 @@ class CentralColumns
*
* @return true|PhpMyAdmin\Message
*/
public static function syncUniqueColumns($field_select, $isTable=true, $table=null)
public static function syncUniqueColumns(array $field_select, $isTable=true, $table=null)
{
$cfgCentralColumns = self::getParams();
if (empty($cfgCentralColumns)) {
@ -329,7 +329,7 @@ class CentralColumns
*
* @return true|PhpMyAdmin\Message
*/
public static function deleteColumnsFromList($field_select, $isTable=true)
public static function deleteColumnsFromList(array $field_select, $isTable=true)
{
$cfgCentralColumns = self::getParams();
if (empty($cfgCentralColumns)) {
@ -412,7 +412,7 @@ class CentralColumns
*
* @return true|PhpMyAdmin\Message
*/
public static function makeConsistentWithList($db, $selected_tables)
public static function makeConsistentWithList($db, array $selected_tables)
{
$message = true;
foreach ($selected_tables as $table) {
@ -731,7 +731,7 @@ class CentralColumns
*
* @return string html for table header in central columns multi edit page
*/
public static function getEditTableHeader($header_cells)
public static function getEditTableHeader(array $header_cells)
{
$html = '<table id="table_columns" class="noclick"'
. ' style="min-width: 100%;">';
@ -842,7 +842,7 @@ class CentralColumns
*
* @return string html of a particular row in the central columns table.
*/
public static function getHtmlForCentralColumnsTableRow($row, $row_num, $db)
public static function getHtmlForCentralColumnsTableRow(array $row, $row_num, $db)
{
$tableHtml = '<tr data-rownum="' . $row_num . '" id="f_' . $row_num . '">'
. Url::getHiddenInputs(
@ -1011,7 +1011,7 @@ class CentralColumns
*
* @return string html of a particular row in the central columns table.
*/
public static function getHtmlForCentralColumnsEditTableRow($row, $row_num)
public static function getHtmlForCentralColumnsEditTableRow(array $row, $row_num)
{
$tableHtml = '<tr>'
. '<input name="orig_col_name[' . $row_num . ']" type="hidden" '
@ -1234,7 +1234,7 @@ class CentralColumns
*
* @return void
*/
public static function handleColumnExtra(&$columns_list)
public static function handleColumnExtra(array &$columns_list)
{
foreach ($columns_list as &$row) {
$vals = explode(',', $row['col_extra']);
@ -1389,7 +1389,7 @@ class CentralColumns
*
* @return string HTML for complete editing page for central columns
*/
public static function getHtmlForEditingPage($selected_fld,$selected_db)
public static function getHtmlForEditingPage(array $selected_fld, $selected_db)
{
$html = '<form id="multi_edit_central_columns">';
$header_cells = array(

View File

@ -853,7 +853,7 @@ class Config
*
* @return void
*/
private function _saveConnectionCollation($config_data)
private function _saveConnectionCollation(array $config_data)
{
// just to shorten the lines
$collation = 'collation_connection';

View File

@ -77,11 +77,11 @@ class ConfigFile
/**
* Constructor
*
* @param array $base_config base configuration read from
* {@link PhpMyAdmin\Config::$base_config},
* use only when not in PMA Setup
* @param array|null $base_config base configuration read from
* {@link PhpMyAdmin\Config::$base_config},
* use only when not in PMA Setup
*/
public function __construct(array $base_config = null)
public function __construct($base_config = null)
{
// load default config values
$cfg = &$this->_defaultCfg;

View File

@ -172,7 +172,7 @@ class Form
*
* @return void
*/
protected function readFormPaths($form)
protected function readFormPaths(array $form)
{
// flatten form fields' paths and save them to $fields
$this->fields = array();
@ -224,7 +224,7 @@ class Form
*
* @return void
*/
public function loadForm($form_name, $form)
public function loadForm($form_name, array $form)
{
$this->name = $form_name;
$this->readFormPaths($form);

View File

@ -268,13 +268,13 @@ class FormDisplay
/**
* Outputs HTML for forms
*
* @param bool $tabbed_form if true, use a form with tabs
* @param bool $show_restore_default whether show "restore default" button
* besides the input field
* @param bool $show_buttons whether show submit and reset button
* @param string $form_action action attribute for the form
* @param array $hidden_fields array of form hidden fields (key: field
* name)
* @param bool $tabbed_form if true, use a form with tabs
* @param bool $show_restore_default whether show "restore default" button
* besides the input field
* @param bool $show_buttons whether show submit and reset button
* @param string $form_action action attribute for the form
* @param array|null $hidden_fields array of form hidden fields (key: field
* name)
*
* @return string HTML for forms
*/
@ -867,7 +867,7 @@ class FormDisplay
*
* @return void
*/
private function _fillPostArrayParameters($post_values, $key)
private function _fillPostArrayParameters(array $post_values, $key)
{
foreach ($post_values as $v) {
$v = Util::requestString($v);

View File

@ -22,9 +22,9 @@ class FormDisplayTemplate
/**
* Displays top part of the form
*
* @param string $action default: $_SERVER['REQUEST_URI']
* @param string $method 'post' or 'get'
* @param array $hidden_fields array of form hidden fields (key: field name)
* @param string $action default: $_SERVER['REQUEST_URI']
* @param string $method 'post' or 'get'
* @param array|null $hidden_fields array of form hidden fields (key: field name)
*
* @return string
*/
@ -61,7 +61,7 @@ class FormDisplayTemplate
*
* @return string
*/
public static function displayTabsTop($tabs)
public static function displayTabsTop(array $tabs)
{
$items = array();
foreach ($tabs as $tab_id => $tab_name) {
@ -87,15 +87,15 @@ class FormDisplayTemplate
/**
* Displays top part of a fieldset
*
* @param string $title title of fieldset
* @param string $description description shown on top of fieldset
* @param array $errors error messages to display
* @param array $attributes optional extra attributes of fieldset
* @param string $title title of fieldset
* @param string $description description shown on top of fieldset
* @param array|null $errors error messages to display
* @param array $attributes optional extra attributes of fieldset
*
* @return string
*/
public static function displayFieldsetTop($title = '', $description = '', $errors = null,
$attributes = array()
array $attributes = array()
) {
global $_FormDisplayGroup;
@ -141,13 +141,13 @@ class FormDisplayTemplate
* o comment - (string) tooltip comment
* o comment_warning - (bool) whether this comments warns about something
*
* @param string $path config option path
* @param string $name config option name
* @param string $type type of config option
* @param mixed $value current value
* @param string $description verbose description
* @param bool $value_is_default whether value is default
* @param array $opts see above description
* @param string $path config option path
* @param string $name config option name
* @param string $type type of config option
* @param mixed $value current value
* @param string $description verbose description
* @param bool $value_is_default whether value is default
* @param array|null $opts see above description
*
* @return string
*/
@ -482,7 +482,7 @@ class FormDisplayTemplate
*
* @return void
*/
public static function addJsValidate($field_id, $validators, &$js_array)
public static function addJsValidate($field_id, $validators, array &$js_array)
{
foreach ((array)$validators as $validator) {
$validator = (array)$validator;
@ -504,7 +504,7 @@ class FormDisplayTemplate
*
* @return string
*/
public static function displayJavascript($js_array)
public static function displayJavascript(array $js_array)
{
if (empty($js_array)) {
return null;
@ -523,7 +523,7 @@ class FormDisplayTemplate
*
* @return string HTML for errors
*/
public static function displayErrors($name, $error_list)
public static function displayErrors($name, array $error_list)
{
$htmlOutput = '<dl>';
$htmlOutput .= '<dt>' . htmlspecialchars($name) . '</dt>';

View File

@ -93,7 +93,7 @@ class Validator
* @return bool|array
*/
public static function validate(
ConfigFile $cf, $validator_id, &$values, $isPostSource
ConfigFile $cf, $validator_id, array &$values, $isPostSource
) {
// find validators
$validator_id = (array) $validator_id;
@ -235,7 +235,7 @@ class Validator
*
* @return array
*/
public static function validateServer($path, $values)
public static function validateServer($path, array $values)
{
$result = array(
'Server' => '',
@ -307,7 +307,7 @@ class Validator
*
* @return array
*/
public static function validatePMAStorage($path, $values)
public static function validatePMAStorage($path, array $values)
{
$result = array(
'Server_pmadb' => '',
@ -360,7 +360,7 @@ class Validator
*
* @return array
*/
public static function validateRegex($path, $values)
public static function validateRegex($path, array $values)
{
$result = array($path => '');
@ -402,7 +402,7 @@ class Validator
*
* @return array
*/
public static function validateTrustedProxies($path, $values)
public static function validateTrustedProxies($path, array $values)
{
$result = array($path => array());
@ -459,7 +459,7 @@ class Validator
*/
public static function validateNumber(
$path,
$values,
array $values,
$allow_neg,
$allow_zero,
$max_value,
@ -490,7 +490,7 @@ class Validator
*
* @return array
*/
public static function validatePortNumber($path, $values)
public static function validatePortNumber($path, array $values)
{
return array(
$path => static::validateNumber(
@ -512,7 +512,7 @@ class Validator
*
* @return array
*/
public static function validatePositiveNumber($path, $values)
public static function validatePositiveNumber($path, array $values)
{
return array(
$path => static::validateNumber(
@ -534,7 +534,7 @@ class Validator
*
* @return array
*/
public static function validateNonNegativeNumber($path, $values)
public static function validateNonNegativeNumber($path, array $values)
{
return array(
$path => static::validateNumber(
@ -558,7 +558,7 @@ class Validator
*
* @return array
*/
public static function validateByRegex($path, $values, $regex)
public static function validateByRegex($path, array $values, $regex)
{
if (!isset($values[$path])) {
return '';
@ -576,7 +576,7 @@ class Validator
*
* @return array
*/
public static function validateUpperBound($path, $values, $max_value)
public static function validateUpperBound($path, array $values, $max_value)
{
$result = $values[$path] <= $max_value;
return array($path => ($result ? ''

View File

@ -742,7 +742,7 @@ class DatabaseStructureController extends DatabaseController
*
* @return array
*/
protected function isRowCountApproximated($current_table, $table_is_view)
protected function isRowCountApproximated(array $current_table, $table_is_view)
{
$approx_rows = false;
$show_superscript = '';
@ -846,7 +846,7 @@ class DatabaseStructureController extends DatabaseController
protected function synchronizeFavoriteTables(
$fav_instance,
$user,
$favorite_tables
array $favorite_tables
) {
$fav_instance_tables = $fav_instance->getTables();
@ -899,7 +899,7 @@ class DatabaseStructureController extends DatabaseController
*
* @return bool
*/
protected function hasTable($db, $truename)
protected function hasTable(array $db, $truename)
{
foreach ($db as $db_table) {
if ($this->db == Replication::extractDbOrTable($db_table)
@ -926,7 +926,7 @@ class DatabaseStructureController extends DatabaseController
* @internal param bool $table_is_view whether table is view or not
*/
protected function getStuffForEngineTypeTable(
$current_table, $sum_size, $overhead_size
array $current_table, $sum_size, $overhead_size
) {
$formatted_size = '-';
$unit = '';
@ -1018,7 +1018,7 @@ class DatabaseStructureController extends DatabaseController
* @return array
*/
protected function getValuesForAriaTable(
$current_table, $sum_size, $overhead_size, $formatted_size, $unit,
array $current_table, $sum_size, $overhead_size, $formatted_size, $unit,
$formatted_overhead, $overhead_unit
) {
if ($this->_db_is_system_schema) {
@ -1059,7 +1059,7 @@ class DatabaseStructureController extends DatabaseController
* @return array
*/
protected function getValuesForInnodbTable(
$current_table, $sum_size
array $current_table, $sum_size
) {
$formatted_size = $unit = '';

View File

@ -79,7 +79,7 @@ class ServerBinlogController extends Controller
*
* @return string
*/
private function _getLogSelector($url_params)
private function _getLogSelector(array $url_params)
{
return Template::get('server/binlog/log_selector')->render(
array(
@ -96,7 +96,7 @@ class ServerBinlogController extends Controller
*
* @return string
*/
private function _getLogInfo($url_params)
private function _getLogInfo(array $url_params)
{
/**
* Need to find the real end of rows?
@ -176,7 +176,7 @@ class ServerBinlogController extends Controller
*
* @return string
*/
private function _getNavigationRow($url_params, $pos, $num_rows, $dontlimitchars)
private function _getNavigationRow(array $url_params, $pos, $num_rows, $dontlimitchars)
{
$html = "";
// we do not know how much rows are in the binlog

View File

@ -54,8 +54,8 @@ class ServerCollationsController extends Controller
*
* @return string
*/
function _getHtmlForCharsets($mysqlCharsets, $mysqlCollations,
$mysqlCharsetsDesc, $mysqlDftCollations
function _getHtmlForCharsets(array $mysqlCharsets, array $mysqlCollations,
array $mysqlCharsetsDesc, array $mysqlDftCollations
) {
return Template::get('server/collations/charsets')->render(
array(

View File

@ -262,9 +262,8 @@ class ServerDatabasesController extends Controller
*
* @return string
*/
private function _getHtmlForDatabases($replication_types)
private function _getHtmlForDatabases(array $replication_types)
{
$html = '<div id="tableslistcontainer">';
$first_database = reset($this->_databases);
// table col order
@ -433,7 +432,7 @@ class ServerDatabasesController extends Controller
*
* @return string
*/
private function _getHtmlForTableBody($column_order, $replication_types)
private function _getHtmlForTableBody(array $column_order, array $replication_types)
{
$html = '<tbody>' . "\n";
@ -470,8 +469,8 @@ class ServerDatabasesController extends Controller
* @return array $column_order, $out
*/
function _buildHtmlForDb(
$current, $column_order,
$replication_types, $replication_info, $tr_class = ''
array $current, array $column_order,
array $replication_types, array $replication_info, $tr_class = ''
) {
$master_replication = $slave_replication = '';
foreach ($replication_types as $type) {
@ -535,7 +534,7 @@ class ServerDatabasesController extends Controller
* @return string
*/
private function _getHtmlForTableHeader(
$_url_params, $column_order, $first_database
array $_url_params, array $column_order, array $first_database
) {
return Template::get('server/databases/table_header')->render(
array(

View File

@ -289,7 +289,7 @@ class ServerVariablesController extends Controller
*
* @return string
*/
private function _getHtmlForServerVariables($serverVars, $serverVarsSession)
private function _getHtmlForServerVariables(array $serverVars, array $serverVarsSession)
{
// filter
$filterValue = ! empty($_REQUEST['filter']) ? $_REQUEST['filter'] : '';
@ -322,7 +322,7 @@ class ServerVariablesController extends Controller
* @return string
*/
private function _getHtmlForServerVariablesItems(
$serverVars, $serverVarsSession
array $serverVars, array $serverVarsSession
) {
// list of static (i.e. non-editable) system variables
$static_variables = $this->_getStaticSystemVariables();

View File

@ -43,7 +43,7 @@ class TableChartController extends TableController
* @param string $url_query Query URL
* @param array $cfg Configuration
*/
public function __construct($sql_query, $url_query, $cfg)
public function __construct($sql_query, $url_query, array $cfg)
{
parent::__construct();

View File

@ -56,10 +56,10 @@ class TableGisVisualizationController extends TableController
*/
public function __construct(
$sql_query,
$url_params,
array $url_params,
$goto,
$back,
$visualizationSettings
array $visualizationSettings
) {
parent::__construct();

View File

@ -56,12 +56,12 @@ class TableRelationController extends TableController
/**
* Constructor
*
* @param array $options_array Options
* @param array $cfgRelation Config relation
* @param string $tbl_storage_engine Table storage engine
* @param array $existrel Relations
* @param array $existrel_foreign External relations
* @param string $upd_query Update query
* @param array|null $options_array Options
* @param array|null $cfgRelation Config relation
* @param string $tbl_storage_engine Table storage engine
* @param array|null $existrel Relations
* @param array|null $existrel_foreign External relations
* @param string $upd_query Update query
*/
public function __construct($options_array, $cfgRelation, $tbl_storage_engine,
$existrel, $existrel_foreign, $upd_query

View File

@ -1067,7 +1067,7 @@ class TableStructureController extends TableController
* @return boolean $changed boolean whether at least one column privileges
* adjusted
*/
protected function adjustColumnPrivileges($adjust_privileges)
protected function adjustColumnPrivileges(array $adjust_privileges)
{
$changed = false;
@ -1155,8 +1155,8 @@ class TableStructureController extends TableController
* @return string
*/
protected function displayStructure(
$cfgRelation, $columns_with_unique_index, $url_params,
$primary_index, $fields, $columns_with_index
array $cfgRelation, array $columns_with_unique_index, $url_params,
$primary_index, array $fields, array $columns_with_index
) {
/* TABLE INFORMATION */
$HideStructureActions = '';

View File

@ -388,7 +388,7 @@ class Core
*
* @return boolean whether $page is valid or not (in $whitelist or not)
*/
public static function checkPageValidity(&$page, $whitelist)
public static function checkPageValidity(&$page, array $whitelist)
{
if (! isset($page) || !is_string($page)) {
return false;
@ -592,7 +592,7 @@ class Core
*
* @return mixed array element or $default
*/
public static function arrayRead($path, $array, $default = null)
public static function arrayRead($path, array $array, $default = null)
{
$keys = explode('/', $path);
$value =& $array;
@ -614,7 +614,7 @@ class Core
*
* @return void
*/
public static function arrayWrite($path, &$array, $value)
public static function arrayWrite($path, array &$array, $value)
{
$keys = explode('/', $path);
$last_key = array_pop($keys);
@ -636,7 +636,7 @@ class Core
*
* @return void
*/
public static function arrayRemove($path, &$array)
public static function arrayRemove($path, array &$array)
{
$keys = explode('/', $path);
$keys_last = array_pop($keys);
@ -828,7 +828,7 @@ class Core
*
* @return void
*/
public static function setPostAsGlobal($post_patterns)
public static function setPostAsGlobal(array $post_patterns)
{
foreach (array_keys($_POST) as $post_key) {
foreach ($post_patterns as $one_post_pattern) {

View File

@ -148,7 +148,7 @@ class CreateAddField
*
* @return array an array of sql statements for indexes
*/
public static function buildIndexStatements($index, $index_choice,
public static function buildIndexStatements(array $index, $index_choice,
$is_create_tbl = true
) {
$statement = array();
@ -235,7 +235,7 @@ class CreateAddField
* @return array $index_definitions
*/
public static function mergeIndexStatements(
$definitions, $is_create_tbl, $indexed_columns, $index_keyword
array $definitions, $is_create_tbl, array $indexed_columns, $index_keyword
) {
foreach ($indexed_columns as $index) {
$statements = self::buildIndexStatements(
@ -351,7 +351,7 @@ class CreateAddField
*
* @return string partition/subpartition definition
*/
public static function getPartitionDefinition($partition, $isSubPartition = false)
public static function getPartitionDefinition(array $partition, $isSubPartition = false)
{
$sql_query = " " . ($isSubPartition ? "SUB" : "") . "PARTITION ";
$sql_query .= $partition['name'];

View File

@ -30,7 +30,7 @@ class Designer
*
* @return string html content
*/
public static function getHtmlForPageSelector($cfgRelation, $db)
public static function getHtmlForPageSelector(array $cfgRelation, $db)
{
return Template::get('database/designer/page_selector')
->render(
@ -149,7 +149,7 @@ class Designer
* @return string html
*/
public static function getHtmlForJsFields(
$script_tables, $script_contr, $script_display_field, $display_page
array $script_tables, array $script_contr, array $script_display_field, $display_page
) {
return Template::get('database/designer/js_fields')
->render(
@ -172,7 +172,7 @@ class Designer
*
* @return string html
*/
public static function getPageMenu($visualBuilder, $selected_page, $params_array)
public static function getPageMenu($visualBuilder, $selected_page, array $params_array)
{
return Template::get('database/designer/side_menu')
->render(
@ -290,7 +290,7 @@ class Designer
*
* @return string html
*/
public static function getHtmlTableList($tab_pos, $display_page)
public static function getHtmlTableList(array $tab_pos, $display_page)
{
return Template::get('database/designer/table_list')
->render(
@ -313,7 +313,7 @@ class Designer
* @return string html
*/
public static function getDatabaseTables(
$tab_pos, $display_page, $tab_column, $tables_all_keys, $tables_pk_or_unique_keys
array $tab_pos, $display_page, array $tab_column, array $tables_all_keys, array $tables_pk_or_unique_keys
) {
return Template::get('database/designer/database_tables')
->render(

View File

@ -155,7 +155,7 @@ class DatabaseInterface
*
* @return mixed cached value or default
*/
public function getCachedTableContent($contentPath, $default = null)
public function getCachedTableContent(array $contentPath, $default = null)
{
return Util::getValueByKey($this->_table_cache, $contentPath, $default);
}
@ -168,7 +168,7 @@ class DatabaseInterface
*
* @return void
*/
public function cacheTableContent($contentPath, $value)
public function cacheTableContent(array $contentPath, $value)
{
$loc = &$this->_table_cache;
@ -212,7 +212,7 @@ class DatabaseInterface
*
* @return void
*/
private function _cacheTableData($tables, $table)
private function _cacheTableData(array $tables, $table)
{
// Note: I don't see why we would need array_merge_recursive() here,
// as it creates double entries for the same table (for example a double
@ -1000,7 +1000,7 @@ class DatabaseInterface
*
* @return array
*/
public function getColumnMapFromSql($sql_query, $view_columns = array())
public function getColumnMapFromSql($sql_query, array $view_columns = array())
{
$result = $this->tryQuery($sql_query);
@ -1594,7 +1594,7 @@ class DatabaseInterface
*
* @return mixed
*/
private function _fetchValue($row, $value)
private function _fetchValue(array $row, $value)
{
if (is_null($value)) {
return $row;
@ -2276,9 +2276,9 @@ class DatabaseInterface
/**
* Return connection parameters for the database server
*
* @param integer $mode Connection mode on of CONNECT_USER, CONNECT_CONTROL
* or CONNECT_AUXILIARY.
* @param array $server Server information like host/port/socket/persistent
* @param integer $mode Connection mode on of CONNECT_USER, CONNECT_CONTROL
* or CONNECT_AUXILIARY.
* @param array|null $server Server information like host/port/socket/persistent
*
* @return array user, host and server settings array
*/
@ -2364,9 +2364,9 @@ class DatabaseInterface
/**
* connects to the database server
*
* @param integer $mode Connection mode on of CONNECT_USER, CONNECT_CONTROL
* or CONNECT_AUXILIARY.
* @param array $server Server information like host/port/socket/persistent
* @param integer $mode Connection mode on of CONNECT_USER, CONNECT_CONTROL
* or CONNECT_AUXILIARY.
* @param array|null $server Server information like host/port/socket/persistent
*
* @return mixed false on error or a connection object on success
*/

View File

@ -248,7 +248,7 @@ class DbQbe
* @param SavedSearches $currentSearch Current search id
*/
public function __construct(
$dbname, $savedSearchList = array(), $currentSearch = null
$dbname, array $savedSearchList = array(), $currentSearch = null
) {
$this->_db = $dbname;
$this->_savedSearchList = $savedSearchList;
@ -866,9 +866,9 @@ class DbQbe
* Provides And/Or modification cell along with Insert/Delete options
* (For modifying search form's table columns)
*
* @param integer $column_number Column Number (0,1,2) or more
* @param array $selected Selected criteria column name
* @param bool $last_column Whether this is the last column
* @param integer $column_number Column Number (0,1,2) or more
* @param array|null $selected Selected criteria column name
* @param bool $last_column Whether this is the last column
*
* @return string HTML for modification cell
*/
@ -961,7 +961,7 @@ class DbQbe
*
* @return string HTML
*/
private function _getInsDelAndOrCell($row_index, $checked_options)
private function _getInsDelAndOrCell($row_index, array $checked_options)
{
$html_output = '<td class="' . $GLOBALS['cell_align_right'] . ' nowrap">';
$html_output .= '<!-- Row controls -->';
@ -1308,8 +1308,8 @@ class DbQbe
*
* @return array having UNIQUE and INDEX columns
*/
private function _getIndexes($search_tables, $search_columns,
$where_clause_columns
private function _getIndexes(array $search_tables, array $search_columns,
array $where_clause_columns
) {
$unique_columns = array();
$index_columns = array();
@ -1351,8 +1351,8 @@ class DbQbe
*
* @return array having UNIQUE and INDEX columns
*/
private function _getLeftJoinColumnCandidates($search_tables, $search_columns,
$where_clause_columns
private function _getLeftJoinColumnCandidates(array $search_tables, array $search_columns,
array $where_clause_columns
) {
$GLOBALS['dbi']->selectDb($this->_db);
@ -1411,8 +1411,8 @@ class DbQbe
*
* @return string table name
*/
private function _getMasterTable($search_tables, $search_columns,
$where_clause_columns, $where_clause_tables
private function _getMasterTable(array $search_tables, array $search_columns,
array $where_clause_columns, array $where_clause_tables
) {
if (count($where_clause_tables) == 1) {
// If there is exactly one column that has a decent where-clause
@ -1532,7 +1532,7 @@ class DbQbe
*
* @return string FROM clause
*/
private function _getFromClause($formColumns)
private function _getFromClause(array $formColumns)
{
$from_clause = '';
if (empty($formColumns)) {
@ -1579,7 +1579,7 @@ class DbQbe
*
* @return string table name
*/
private function _getJoinForFromClause($searchTables, $searchColumns)
private function _getJoinForFromClause(array $searchTables, array $searchColumns)
{
// $relations[master_table][foreign_table] => clause
$relations = array();
@ -1702,7 +1702,7 @@ class DbQbe
*
* @return void
*/
private function _loadRelationsForTable(&$relations, $oneTable)
private function _loadRelationsForTable(array &$relations, $oneTable)
{
$relations[$oneTable] = array();
@ -1743,7 +1743,7 @@ class DbQbe
*
* @return void
*/
private function _fillJoinClauses(&$finalized, $relations, $searchTables)
private function _fillJoinClauses(array &$finalized, array $relations, array $searchTables)
{
while (true) {
$added = false;
@ -1784,7 +1784,7 @@ class DbQbe
*
* @return string SQL query
*/
private function _getSQLQuery($formColumns)
private function _getSQLQuery(array $formColumns)
{
$sql_query = '';
// get SELECT clause
@ -1967,7 +1967,7 @@ class DbQbe
* @return array
*/
private function _getLeftJoinColumnCandidatesBest(
$search_tables, $where_clause_columns, $unique_columns, $index_columns
array $search_tables, array $where_clause_columns, array $unique_columns, array $index_columns
) {
// now we want to find the best.
if (isset($unique_columns) && count($unique_columns) > 0) {

View File

@ -312,7 +312,7 @@ class DbSearch
*
* @return string HTML row
*/
private function _getResultsRow($each_table, $newsearchsqls, $res_cnt)
private function _getResultsRow($each_table, array $newsearchsqls, $res_cnt)
{
$this_url_params = array(
'db' => $GLOBALS['db'],

View File

@ -41,7 +41,7 @@ class DbiDummy implements DbiExtension
public function connect(
$user,
$password,
$server = null
array $server = []
) {
return true;
}

View File

@ -23,7 +23,7 @@ interface DbiExtension
* @return mixed false on error or a connection object on success
*/
public function connect(
$user, $password, $server
$user, $password, array $server
);
/**

View File

@ -92,7 +92,7 @@ class DbiMysql implements DbiExtension
* @return mixed false on error or a mysqli object on success
*/
public function connect(
$user, $password, $server
$user, $password, array $server
) {
if ($server['port'] === 0) {
$server_port = '';

View File

@ -76,7 +76,7 @@ class DbiMysqli implements DbiExtension
* @return mixed false on error or a mysqli object on success
*/
public function connect(
$user, $password, $server
$user, $password, array $server
) {
if ($server) {
$server['host'] = (empty($server['host']))

View File

@ -39,7 +39,7 @@ class AliasItem implements Item
* @param array $params Parameters
* @return mixed
*/
public function get($params = array())
public function get(array $params = array())
{
return $this->container->get($this->target, $params);
}

View File

@ -52,7 +52,7 @@ class Container implements ContainerInterface
*
* @return mixed
*/
public function get($name, $params = array())
public function get($name, array $params = array())
{
if (!$this->has($name)) {
throw new NotFoundException("No entry was found for $name identifier.");

View File

@ -22,7 +22,7 @@ class FactoryItem extends ReflectorItem
*
* @return mixed
*/
public function get($params = array())
public function get(array $params = array())
{
return $this->invoke($params);
}

View File

@ -21,5 +21,5 @@ interface Item
* @param array $params Parameters
* @return mixed
*/
public function get($params = array());
public function get(array $params = array());
}

View File

@ -39,7 +39,7 @@ abstract class ReflectorItem implements Item
* @param array $params Parameters
* @return mixed
*/
protected function invoke($params = array())
protected function invoke(array $params = array())
{
$args = array();
$reflector = $this->_reflector;
@ -74,7 +74,7 @@ abstract class ReflectorItem implements Item
*
*@return array
*/
private function _resolveArgs($required, $params = array())
private function _resolveArgs($required, array $params = array())
{
$args = array();
foreach ($required as $param) {

View File

@ -24,7 +24,7 @@ class ServiceItem extends ReflectorItem
* @param array $params Parameters
* @return mixed
*/
public function get($params = array())
public function get(array $params = array())
{
if (!isset($this->instance)) {
$this->instance = $this->invoke();

View File

@ -34,7 +34,7 @@ class ValueItem implements Item
* @param array $params Parameters
* @return mixed
*/
public function get($params = array())
public function get(array $params = array())
{
return $this->value;
}

View File

@ -1064,7 +1064,7 @@ class Export
*
* @return void
*/
public static function handleExportTemplateActions($cfgRelation)
public static function handleExportTemplateActions(array $cfgRelation)
{
if (isset($_REQUEST['templateId'])) {
$id = $GLOBALS['dbi']->escapeString($_REQUEST['templateId']);

View File

@ -437,7 +437,7 @@ class Results
* @access private
*
*/
private function _setDisplayPartsForPrintView($displayParts)
private function _setDisplayPartsForPrintView(array $displayParts)
{
// set all elements to false!
$displayParts['edit_lnk'] = self::NO_EDIT_OR_DELETE; // no edit link
@ -461,7 +461,7 @@ class Results
* @access private
*
*/
private function _setDisplayPartsForShow($displayParts)
private function _setDisplayPartsForShow(array $displayParts)
{
preg_match(
'@^SHOW[[:space:]]+(VARIABLES|(FULL[[:space:]]+)?'
@ -509,7 +509,7 @@ class Results
* @access private
*
*/
private function _setDisplayPartsForNonData($displayParts)
private function _setDisplayPartsForNonData(array $displayParts)
{
// Statement is a "SELECT COUNT", a
// "CHECK/ANALYZE/REPAIR/OPTIMIZE/CHECKSUM", an "EXPLAIN" one or
@ -540,7 +540,7 @@ class Results
* @access private
*
*/
private function _setDisplayPartsForSelect($displayParts)
private function _setDisplayPartsForSelect(array $displayParts)
{
// Other statements (ie "SELECT" ones) -> updates
// $displayParts['edit_lnk'], $displayParts['del_lnk'] and
@ -611,7 +611,7 @@ class Results
*
* @see getTable()
*/
private function _setDisplayPartsAndTotal($displayParts)
private function _setDisplayPartsAndTotal(array $displayParts)
{
$the_total = 0;
@ -690,7 +690,7 @@ class Results
*
* @see _getTableHeaders(), _getColumnParams()
*/
private function _isSelect($analyzed_sql_results)
private function _isSelect(array $analyzed_sql_results)
{
return ! ($this->__get('is_count')
|| $this->__get('is_export')
@ -1178,8 +1178,8 @@ class Results
* @see getTableHeaders()
*/
private function _getTableHeadersForColumns(
$displayParts, $analyzed_sql_results, $sort_expression,
$sort_expression_nodirection, $sort_direction, $is_limited_display,
array $displayParts, array $analyzed_sql_results, array $sort_expression,
array $sort_expression_nodirection, array $sort_direction, $is_limited_display,
$unsorted_sql_query
) {
$html = '';
@ -1268,15 +1268,15 @@ class Results
/**
* Get the headers of the results table
*
* @param array &$displayParts which elements to display
* @param array $analyzed_sql_results analyzed sql results
* @param string $unsorted_sql_query the unsorted sql query
* @param array $sort_expression sort expression
* @param array $sort_expression_nodirection sort expression
* without direction
* @param array $sort_direction sort direction
* @param boolean $is_limited_display with limited operations
* or not
* @param array &$displayParts which elements to display
* @param array $analyzed_sql_results analyzed sql results
* @param string $unsorted_sql_query the unsorted sql query
* @param array $sort_expression sort expression
* @param array|string $sort_expression_nodirection sort expression
* without direction
* @param array $sort_direction sort direction
* @param boolean $is_limited_display with limited operations
* or not
*
* @return string html content
*
@ -1285,9 +1285,9 @@ class Results
* @see getTable()
*/
private function _getTableHeaders(
&$displayParts, $analyzed_sql_results, $unsorted_sql_query,
$sort_expression = array(), $sort_expression_nodirection = '',
$sort_direction = array(), $is_limited_display = false
array &$displayParts, array $analyzed_sql_results, $unsorted_sql_query,
array $sort_expression = array(), $sort_expression_nodirection = '',
array $sort_direction = array(), $is_limited_display = false
) {
$table_headers_html = '';
@ -1379,7 +1379,7 @@ class Results
* @see _getTableHeaders()
*/
private function _getUnsortedSqlAndSortByKeyDropDown(
$analyzed_sql_results, $sort_expression
array $analyzed_sql_results, $sort_expression
) {
$drop_down_html = '';
@ -1517,7 +1517,7 @@ class Results
* @see _getTableHeaders()
*/
private function _getFieldVisibilityParams(
&$displayParts, $full_or_partial_text_link
array &$displayParts, $full_or_partial_text_link
) {
$button_html = '';
@ -1592,7 +1592,7 @@ class Results
*
* @see _getTableHeaders()
*/
private function _getTableCommentsArray($analyzed_sql_results)
private function _getTableCommentsArray(array $analyzed_sql_results)
{
if ((!$GLOBALS['cfg']['ShowBrowseComments'])
|| (empty($analyzed_sql_results['statement']->from))
@ -1627,7 +1627,7 @@ class Results
*
* @see _getTableHeaders()
*/
private function _setHighlightedColumnGlobalField($analyzed_sql_results)
private function _setHighlightedColumnGlobalField(array $analyzed_sql_results)
{
$highlight_columns = array();
@ -1655,7 +1655,7 @@ class Results
*
* @see _getTableHeaders()
*/
private function _getDataForResettingColumnOrder($analyzed_sql_results)
private function _getDataForResettingColumnOrder(array $analyzed_sql_results)
{
if (! $this->_isSelect($analyzed_sql_results)) {
return '';
@ -1922,7 +1922,7 @@ class Results
*
* @see _getTableHeaders()
*/
private function _getCommentForRow($comments_map, $fields_meta)
private function _getCommentForRow(array $comments_map, $fields_meta)
{
$comments = '';
if (isset($comments_map[$fields_meta->table])
@ -1969,9 +1969,9 @@ class Results
* @see _getTableHeaders()
*/
private function _getOrderLinkAndSortedHeaderHtml(
$fields_meta, $sort_expression, $sort_expression_nodirection,
$fields_meta, array $sort_expression, array $sort_expression_nodirection,
$column_index, $unsorted_sql_query, $session_max_rows,
$comments, $sort_direction, $col_visib, $col_visib_j
$comments, array $sort_direction, $col_visib, $col_visib_j
) {
$sorted_header_html = '';
@ -2065,8 +2065,8 @@ class Results
* @see _getOrderLinkAndSortedHeaderHtml()
*/
private function _getSingleAndMultiSortUrls(
$sort_expression, $sort_expression_nodirection, $sort_tbl,
$name_to_use_in_sort, $sort_direction, $fields_meta, $column_index
array $sort_expression, array $sort_expression_nodirection, $sort_tbl,
$name_to_use_in_sort, array $sort_direction, $fields_meta, $column_index
) {
$sort_order = "";
// Check if the current column is in the order by clause
@ -2195,7 +2195,7 @@ class Results
* @see _getTableHeaders()
*/
private function _isInSorted(
$sort_expression, $sort_expression_nodirection, $sort_tbl,
array $sort_expression, array $sort_expression_nodirection, $sort_tbl,
$name_to_use_in_sort
) {
@ -2271,7 +2271,7 @@ class Results
*
* @see _getSingleAndMultiSortUrls()
*/
private function _getSortingUrlParams($sort_direction, $sort_order, $index)
private function _getSortingUrlParams(array $sort_direction, $sort_order, $index)
{
if (strtoupper(trim($sort_direction[$index])) == self::DESCENDING_SORT_DIR) {
$sort_order .= ' ASC';
@ -2341,7 +2341,7 @@ class Results
*
* @see _getDraggableClassForSortableColumns()
*/
private function _getClassForNumericColumnType($fields_meta,&$th_class)
private function _getClassForNumericColumnType($fields_meta, array &$th_class)
{
if (preg_match(
'@int|decimal|float|double|real|bit|boolean|serial@i',
@ -2460,7 +2460,7 @@ class Results
* @see _getTableHeaders()
*/
private function _getColumnAtRightSide(
&$displayParts, $full_or_partial_text_link, $colspan
array &$displayParts, $full_or_partial_text_link, $colspan
) {
$right_column_html = '';
@ -2675,7 +2675,7 @@ class Results
* @see getTable()
*/
private function _getTableBody(
&$dt_result, &$displayParts, $map, $analyzed_sql_results,
&$dt_result, array &$displayParts, array $map, array $analyzed_sql_results,
$is_limited_display = false
) {
@ -2964,7 +2964,7 @@ class Results
* displayed
* @param array $row current row data
* @param integer $row_no the index of current row
* @param array $col_order the column order false when
* @param array|boolean $col_order the column order false when
* a property not found false
* when a property not found
* @param array $map the list of relations
@ -2983,9 +2983,9 @@ class Results
* @see _getTableBody()
*/
private function _getRowValues(
&$dt_result, $row, $row_no, $col_order, $map,
&$dt_result, array $row, $row_no, $col_order, array $map,
$grid_edit_class, $col_visib,
$url_sql_query, $analyzed_sql_results
$url_sql_query, array $analyzed_sql_results
) {
$row_values_html = '';
@ -3263,7 +3263,7 @@ class Results
*
* @return string generated link
*/
private function _getSpecialLinkUrl($column_value, $row_info, $field_name)
private function _getSpecialLinkUrl($column_value, array $row_info, $field_name)
{
$linking_url_params = array();
@ -3317,12 +3317,12 @@ class Results
/**
* Prepare row information for display special links
*
* @param array $row current row data
* @param array $col_order the column order
* @param array $row current row data
* @param array|boolean $col_order the column order
*
* @return array $row_info associative array with column nama -> value
*/
private function _getRowInfoForSpecialLinks($row, $col_order)
private function _getRowInfoForSpecialLinks(array $row, $col_order)
{
$row_info = array();
@ -3349,7 +3349,7 @@ class Results
*
* @see _getTableBody()
*/
private function _getUrlSqlQuery($analyzed_sql_results)
private function _getUrlSqlQuery(array $analyzed_sql_results)
{
if (($analyzed_sql_results['querytype'] != 'SELECT')
|| (mb_strlen($this->__get('sql_query')) < 200)
@ -3389,7 +3389,7 @@ class Results
*
* @see _getTableBody()
*/
private function _getColumnParams($analyzed_sql_results)
private function _getColumnParams(array $analyzed_sql_results)
{
if ($this->_isSelect($analyzed_sql_results)) {
$pmatable = new Table($this->__get('table'), $this->__get('db'));
@ -3426,7 +3426,7 @@ class Results
* @see _getTableBody()
*/
private function _getRepeatingHeaders(
$display_params
array $display_params
) {
$header_html = '<tr>' . "\n";
@ -3529,7 +3529,7 @@ class Results
* @see _getTableBody()
*/
private function _getDeleteAndKillLinks(
$where_clause, $clause_is_unique, $url_sql_query, $del_lnk, $row
$where_clause, $clause_is_unique, $url_sql_query, $del_lnk, array $row
) {
$goto = $this->__get('goto');
@ -3670,8 +3670,8 @@ class Results
* @see _getTableBody()
*/
private function _getPlacedLinks(
$dir, $del_url, $displayParts, $row_no, $where_clause, $where_clause_html,
$condition_array, $edit_url, $copy_url,
$dir, $del_url, array $displayParts, $row_no, $where_clause, $where_clause_html,
array $condition_array, $edit_url, $copy_url,
$edit_anchor_class, $edit_str, $copy_str, $del_str, $js_conf
) {
@ -3771,9 +3771,9 @@ class Results
* @see _getTableBody()
*/
private function _getDataCellForNumericColumns(
$column, $class, $condition_field, $meta, $map, $is_field_truncated,
$analyzed_sql_results, $transformation_plugin, $default_function,
$transform_options
$column, $class, $condition_field, $meta, array $map, $is_field_truncated,
array $analyzed_sql_results, $transformation_plugin, $default_function,
array $transform_options
) {
if (! isset($column) || is_null($column)) {
@ -3831,9 +3831,9 @@ class Results
* @see _getTableBody()
*/
private function _getDataCellForGeometryColumns(
$column, $class, $meta, $map, $_url_params, $condition_field,
$column, $class, $meta, array $map, array $_url_params, $condition_field,
$transformation_plugin, $default_function, $transform_options,
$analyzed_sql_results
array $analyzed_sql_results
) {
if (! isset($column) || is_null($column)) {
$cell = $this->_buildNullDisplay($class, $condition_field, $meta);
@ -3948,9 +3948,9 @@ class Results
* @see _getTableBody()
*/
private function _getDataCellForNonNumericColumns(
$column, $class, $meta, $map, $_url_params, $condition_field,
$column, $class, $meta, array $map, array $_url_params, $condition_field,
$transformation_plugin, $default_function, $transform_options,
$is_field_truncated, $analyzed_sql_results, &$dt_result, $col_index
$is_field_truncated, array $analyzed_sql_results, &$dt_result, $col_index
) {
$original_length = 0;
@ -4246,7 +4246,7 @@ class Results
* @see sql.php file
*/
public function getTable(
&$dt_result, &$displayParts, $analyzed_sql_results,
&$dt_result, array &$displayParts, array $analyzed_sql_results,
$is_limited_display = false
) {
@ -4661,7 +4661,7 @@ class Results
* @see getTable()
*/
private function _setMessageInformation(
$sorted_column_message, $analyzed_sql_results, $total,
$sorted_column_message, array $analyzed_sql_results, $total,
$pos_next, $pre_count, $after_count
) {
@ -4753,10 +4753,8 @@ class Results
}
return $message;
} // end of the '_setMessageInformation()' function
/**
* Set the value of $map array for linking foreign key related tables
*
@ -4768,9 +4766,8 @@ class Results
*
* @see getTable()
*/
private function _setParamForLinkForeignKeyRelatedTables(&$map)
private function _setParamForLinkForeignKeyRelatedTables(array &$map)
{
// To be able to later display a link to the related table,
// we verify both types of relations: either those that are
// native foreign keys or those defined in the phpMyAdmin
@ -4836,7 +4833,7 @@ class Results
* @see getTable()
*/
private function _getMultiRowOperationLinks(
&$dt_result, $analyzed_sql_results, $del_link
&$dt_result, array $analyzed_sql_results, $del_link
) {
$links_html = '<div class="print_ignore" >';
@ -4968,7 +4965,7 @@ class Results
*
* @see _getResultsOperations()
*/
private function _getLinkForCreateView($analyzed_sql_results, $url_query)
private function _getLinkForCreateView(array $analyzed_sql_results, $url_query)
{
$results_operations_html = '';
if (empty($analyzed_sql_results['procedure'])) {
@ -4999,7 +4996,7 @@ class Results
* @access public
*
*/
public function getCreateViewQueryResultOp($analyzed_sql_results)
public function getCreateViewQueryResultOp(array $analyzed_sql_results)
{
$results_operations_html = '';
@ -5073,7 +5070,7 @@ class Results
* @see getTable()
*/
private function _getResultsOperations(
$displayParts, $analyzed_sql_results, $only_view = false
array $displayParts, array $analyzed_sql_results, $only_view = false
) {
global $printview;
@ -5257,7 +5254,7 @@ class Results
*/
private function _handleNonPrintableContents(
$category, $content, $transformation_plugin, $transform_options,
$default_function, $meta, $url_params = array(), &$is_truncated = null
$default_function, $meta, array $url_params = array(), &$is_truncated = null
) {
$is_truncated = false;
@ -5359,7 +5356,7 @@ class Results
* @access private
*
*/
private function _getFromForeign($map, $meta, $where_comparison)
private function _getFromForeign(array $map, $meta, $where_comparison)
{
$dispsql = 'SELECT '
. Util::backquote($map[$meta->name][2])
@ -5420,9 +5417,9 @@ class Results
*
*/
private function _getRowData(
$class, $condition_field, $analyzed_sql_results, $meta, $map, $data,
$class, $condition_field, array $analyzed_sql_results, $meta, array $map, $data,
$transformation_plugin, $default_function, $nowrap, $where_comparison,
$transform_options, $is_field_truncated, $original_length=''
array $transform_options, $is_field_truncated, $original_length=''
) {
$relational_display = $_SESSION['tmpval']['relational_display'];
$printview = $this->__get('printview');
@ -5570,7 +5567,7 @@ class Results
* @see _getTableBody(), _getCheckboxAndLinks()
*/
private function _getCheckboxForMultiRowSubmissions(
$del_url, $displayParts, $row_no, $where_clause_html, $condition_array,
$del_url, array $displayParts, $row_no, $where_clause_html, array $condition_array,
$id_suffix, $class
) {
@ -5760,8 +5757,8 @@ class Results
* @see _getPlacedLinks()
*/
private function _getCheckboxAndLinks(
$position, $del_url, $displayParts, $row_no, $where_clause,
$where_clause_html, $condition_array,
$position, $del_url, array $displayParts, $row_no, $where_clause,
$where_clause_html, array $condition_array,
$edit_url, $copy_url, $class, $edit_str, $copy_str, $del_str, $js_conf
) {

View File

@ -124,7 +124,7 @@ class Error extends Message
*
* @return array
*/
public static function processBacktrace($backtrace)
public static function processBacktrace(array $backtrace)
{
$result = array();
@ -178,7 +178,7 @@ class Error extends Message
*
* @return void
*/
public function setBacktrace($backtrace)
public function setBacktrace(array $backtrace)
{
$this->backtrace = self::processBacktrace($backtrace);
}
@ -335,7 +335,7 @@ class Error extends Message
*
* @return string formatted backtrace
*/
public static function formatBacktrace($backtrace, $separator, $lines)
public static function formatBacktrace(array $backtrace, $separator, $lines)
{
$retval = '';
@ -362,7 +362,7 @@ class Error extends Message
*
* @return string
*/
public static function getFunctionCall($step, $separator)
public static function getFunctionCall(array $step, $separator)
{
$retval = $step['function'] . '(';
if (isset($step['args'])) {

View File

@ -176,7 +176,7 @@ class ErrorReport
*
* @return String the reply of the server
*/
public static function send($report)
public static function send(array $report)
{
$response = Util::httpRequest(
self::SUBMISSION_URL,
@ -254,7 +254,7 @@ class ErrorReport
* exists
* - Integer $linenumber the translated line number in the returned file
*/
public static function getLineNumber($filenames, $cumulative_number)
public static function getLineNumber(array $filenames, $cumulative_number)
{
$cumulative_sum = 0;
foreach ($filenames as $filename) {
@ -279,7 +279,7 @@ class ErrorReport
*
* @return array $stack the modified stack trace
*/
public static function translateStacktrace($stack)
public static function translateStacktrace(array $stack)
{
foreach ($stack as &$level) {
foreach ($level["context"] as &$line) {

View File

@ -557,7 +557,7 @@ class Export
public static function exportServer(
$db_select, $whatStrucOrData, $export_plugin, $crlf, $err_url,
$export_type, $do_relation, $do_comments, $do_mime, $do_dates,
$aliases, $separate_files
array $aliases, $separate_files
) {
if (! empty($db_select)) {
$tmp_select = implode($db_select, '|');
@ -604,9 +604,9 @@ class Export
* @return void
*/
public static function exportDatabase(
$db, $tables, $whatStrucOrData, $table_structure, $table_data,
$db, array $tables, $whatStrucOrData, array $table_structure, array $table_data,
$export_plugin, $crlf, $err_url, $export_type, $do_relation,
$do_comments, $do_mime, $do_dates, $aliases, $separate_files
$do_comments, $do_mime, $do_dates, array $aliases, $separate_files
) {
$db_alias = !empty($aliases[$db]['alias'])
? $aliases[$db]['alias'] : '';
@ -815,7 +815,7 @@ class Export
public static function exportTable(
$db, $table, $whatStrucOrData, $export_plugin, $crlf, $err_url,
$export_type, $do_relation, $do_comments, $do_mime, $do_dates,
$allrows, $limit_to, $limit_from, $sql_query, $aliases
$allrows, $limit_to, $limit_from, $sql_query, array $aliases
) {
$db_alias = !empty($aliases[$db]['alias'])
? $aliases[$db]['alias'] : '';
@ -954,7 +954,7 @@ class Export
*
* @return array resultant merged aliases info
*/
public static function mergeAliases($aliases1, $aliases2)
public static function mergeAliases(array $aliases1, array $aliases2)
{
// First do a recursive array merge
// on aliases arrays.
@ -1007,7 +1007,7 @@ class Export
*
* @return mixed result of the query
*/
public static function lockTables($db, $tables, $lockType = "WRITE")
public static function lockTables($db, array $tables, $lockType = "WRITE")
{
$locks = array();
foreach ($tables as $table) {
@ -1058,7 +1058,7 @@ class Export
*
* @return string the checked clause
*/
public static function getCheckedClause($key, $array)
public static function getCheckedClause($key, array $array)
{
if (in_array($key, $array)) {
return ' checked="checked"';

View File

@ -344,7 +344,7 @@ class File
* @static
*/
public function fetchUploadedFromTblChangeRequestMultiple(
$file, $rownumber, $key
array $file, $rownumber, $key
) {
$new_file = array(
'name' => $file['name']['multi_edit'][$rownumber][$key],

View File

@ -78,10 +78,10 @@ class Font
* The text element width is calculated depending on font name
* and font size.
*
* @param string $text string of which the width will be calculated
* @param string $font name of the font like Arial,sans-serif etc
* @param integer $fontSize size of font
* @param array $charLists list of characters and their width modifiers
* @param string $text string of which the width will be calculated
* @param string $font name of the font like Arial,sans-serif etc
* @param integer $fontSize size of font
* @param array|null $charLists list of characters and their width modifiers
*
* @return integer width of the text
* @access public

View File

@ -98,7 +98,7 @@ class Footer
*
* @return object Reference passed object
*/
private static function _removeRecursion(&$object, $stack = array())
private static function _removeRecursion(&$object, array $stack = array())
{
if ((is_object($object) || is_array($object)) && $object) {
if ($object instanceof Traversable) {

View File

@ -28,7 +28,7 @@ abstract class GisGeometry
* @return string the code related to a row in the GIS dataset
* @access public
*/
public abstract function prepareRowAsSvg($spatial, $label, $color, $scale_data);
public abstract function prepareRowAsSvg($spatial, $label, $color, array $scale_data);
/**
* Adds to the PNG image object, the data related to a row in the GIS dataset.
@ -46,7 +46,7 @@ abstract class GisGeometry
$spatial,
$label,
$color,
$scale_data,
array $scale_data,
$image
);
@ -66,7 +66,7 @@ abstract class GisGeometry
$spatial,
$label,
$color,
$scale_data,
array $scale_data,
$pdf
);
@ -88,7 +88,7 @@ abstract class GisGeometry
$srid,
$label,
$color,
$scale_data
array $scale_data
);
/**
@ -111,7 +111,7 @@ abstract class GisGeometry
* @return string WKT with the set of parameters passed by the GIS editor
* @access public
*/
public abstract function generateWkt($gis_data, $index, $empty = '');
public abstract function generateWkt(array $gis_data, $index, $empty = '');
/**
* Returns OpenLayers.Bounds object that correspond to the bounds of GIS data.
@ -123,7 +123,7 @@ abstract class GisGeometry
* correspond to the bounds of GIS data
* @access protected
*/
protected function getBoundsForOl($srid, $scale_data)
protected function getBoundsForOl($srid, array $scale_data)
{
return 'bound = new OpenLayers.Bounds(); '
. 'bound.extend(new OpenLayers.LonLat('
@ -145,7 +145,7 @@ abstract class GisGeometry
* @return array the updated min, max values
* @access protected
*/
protected function setMinMax($point_set, $min_max)
protected function setMinMax($point_set, array $min_max)
{
// Separate each point
$points = explode(",", $point_set);
@ -204,9 +204,9 @@ abstract class GisGeometry
/**
* Extracts points, scales and returns them as an array.
*
* @param string $point_set string of comma separated points
* @param array $scale_data data related to scaling
* @param boolean $linear if true, as a 1D array, else as a 2D array
* @param string $point_set string of comma separated points
* @param array|null $scale_data data related to scaling
* @param boolean $linear if true, as a 1D array, else as a 2D array
*
* @return array scaled points
* @access protected
@ -259,7 +259,7 @@ abstract class GisGeometry
* @return string JavaScript for adding an array of polygons to OpenLayers
* @access protected
*/
protected function getPolygonArrayForOpenLayers($polygons, $srid)
protected function getPolygonArrayForOpenLayers(array $polygons, $srid)
{
$ol_array = 'new Array(';
foreach ($polygons as $polygon) {
@ -287,7 +287,7 @@ abstract class GisGeometry
* @return string JavaScript for adding points for OpenLayers polygon
* @access protected
*/
protected function getPolygonForOpenLayers($polygon, $srid)
protected function getPolygonForOpenLayers(array $polygon, $srid)
{
return 'new OpenLayers.Geometry.Polygon('
. $this->getLineArrayForOpenLayers($polygon, $srid, false)
@ -307,7 +307,7 @@ abstract class GisGeometry
* @access protected
*/
protected function getLineArrayForOpenLayers(
$lines,
array $lines,
$srid,
$is_line_string = true
) {
@ -344,7 +344,7 @@ abstract class GisGeometry
* @access protected
*/
protected function getLineForOpenLayers(
$points_arr,
array $points_arr,
$srid,
$is_line_string = true
) {
@ -363,7 +363,7 @@ abstract class GisGeometry
* @return string JavaScript for adding an array of points to OpenLayers
* @access protected
*/
protected function getPointsArrayForOpenLayers($points_arr, $srid)
protected function getPointsArrayForOpenLayers(array $points_arr, $srid)
{
$ol_array = 'new Array(';
foreach ($points_arr as $point) {
@ -390,7 +390,7 @@ abstract class GisGeometry
* @return string JavaScript for adding points to OpenLayers
* @access protected
*/
protected function getPointForOpenLayers($point, $srid)
protected function getPointForOpenLayers(array $point, $srid)
{
return '(new OpenLayers.Geometry.Point(' . $point[0] . ',' . $point[1] . '))'
. '.transform(new OpenLayers.Projection("EPSG:'

View File

@ -118,7 +118,7 @@ class GisGeometryCollection extends GisGeometry
* @return resource the modified image object
* @access public
*/
public function prepareRowAsPng($spatial, $label, $color, $scale_data, $image)
public function prepareRowAsPng($spatial, $label, $color, array $scale_data, $image)
{
// Trim to remove leading 'GEOMETRYCOLLECTION(' and trailing ')'
$goem_col
@ -165,7 +165,7 @@ class GisGeometryCollection extends GisGeometry
* @return TCPDF the modified TCPDF instance
* @access public
*/
public function prepareRowAsPdf($spatial, $label, $color, $scale_data, $pdf)
public function prepareRowAsPdf($spatial, $label, $color, array $scale_data, $pdf)
{
// Trim to remove leading 'GEOMETRYCOLLECTION(' and trailing ')'
$goem_col
@ -211,7 +211,7 @@ class GisGeometryCollection extends GisGeometry
* @return string the code related to a row in the GIS dataset
* @access public
*/
public function prepareRowAsSvg($spatial, $label, $color, $scale_data)
public function prepareRowAsSvg($spatial, $label, $color, array $scale_data)
{
$row = '';
@ -260,7 +260,7 @@ class GisGeometryCollection extends GisGeometry
* @return string JavaScript related to a row in the GIS dataset
* @access public
*/
public function prepareRowAsOl($spatial, $srid, $label, $color, $scale_data)
public function prepareRowAsOl($spatial, $srid, $label, $color, array $scale_data)
{
$row = '';
@ -342,7 +342,7 @@ class GisGeometryCollection extends GisGeometry
* @return string WKT with the set of parameters passed by the GIS editor
* @access public
*/
public function generateWkt($gis_data, $index, $empty = '')
public function generateWkt(array $gis_data, $index, $empty = '')
{
$geom_count = (isset($gis_data['GEOMETRYCOLLECTION']['geom_count']))
? $gis_data['GEOMETRYCOLLECTION']['geom_count'] : 1;

View File

@ -82,7 +82,7 @@ class GisLineString extends GisGeometry
$spatial,
$label,
$line_color,
$scale_data,
array $scale_data,
$image
) {
// allocate colors
@ -144,7 +144,7 @@ class GisLineString extends GisGeometry
* @return TCPDF the modified TCPDF instance
* @access public
*/
public function prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf)
public function prepareRowAsPdf($spatial, $label, $line_color, array $scale_data, $pdf)
{
// allocate colors
$red = hexdec(mb_substr($line_color, 1, 2));
@ -197,7 +197,7 @@ class GisLineString extends GisGeometry
* @return string the code related to a row in the GIS dataset
* @access public
*/
public function prepareRowAsSvg($spatial, $label, $line_color, $scale_data)
public function prepareRowAsSvg($spatial, $label, $line_color, array $scale_data)
{
$line_options = array(
'name' => $label,
@ -243,7 +243,7 @@ class GisLineString extends GisGeometry
* @return string JavaScript related to a row in the GIS dataset
* @access public
*/
public function prepareRowAsOl($spatial, $srid, $label, $line_color, $scale_data)
public function prepareRowAsOl($spatial, $srid, $label, $line_color, array $scale_data)
{
$style_options = array(
'strokeColor' => $line_color,
@ -282,7 +282,7 @@ class GisLineString extends GisGeometry
* @return string WKT with the set of parameters passed by the GIS editor
* @access public
*/
public function generateWkt($gis_data, $index, $empty = '')
public function generateWkt(array $gis_data, $index, $empty = '')
{
$no_of_points = isset($gis_data[$index]['LINESTRING']['no_of_points'])
? $gis_data[$index]['LINESTRING']['no_of_points'] : 2;

View File

@ -90,7 +90,7 @@ class GisMultiLineString extends GisGeometry
$spatial,
$label,
$line_color,
$scale_data,
array $scale_data,
$image
) {
// allocate colors
@ -159,7 +159,7 @@ class GisMultiLineString extends GisGeometry
* @return TCPDF the modified TCPDF instance
* @access public
*/
public function prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf)
public function prepareRowAsPdf($spatial, $label, $line_color, array $scale_data, $pdf)
{
// allocate colors
$red = hexdec(mb_substr($line_color, 1, 2));
@ -219,7 +219,7 @@ class GisMultiLineString extends GisGeometry
* @return string the code related to a row in the GIS dataset
* @access public
*/
public function prepareRowAsSvg($spatial, $label, $line_color, $scale_data)
public function prepareRowAsSvg($spatial, $label, $line_color, array $scale_data)
{
$line_options = array(
'name' => $label,
@ -271,7 +271,7 @@ class GisMultiLineString extends GisGeometry
* @return string JavaScript related to a row in the GIS dataset
* @access public
*/
public function prepareRowAsOl($spatial, $srid, $label, $line_color, $scale_data)
public function prepareRowAsOl($spatial, $srid, $label, $line_color, array $scale_data)
{
$style_options = array(
'strokeColor' => $line_color,
@ -312,7 +312,7 @@ class GisMultiLineString extends GisGeometry
* @return string WKT with the set of parameters passed by the GIS editor
* @access public
*/
public function generateWkt($gis_data, $index, $empty = '')
public function generateWkt(array $gis_data, $index, $empty = '')
{
$data_row = $gis_data[$index]['MULTILINESTRING'];
@ -364,7 +364,7 @@ class GisMultiLineString extends GisGeometry
* @return string the WKT for the data from ESRI shape files
* @access public
*/
public function getShape($row_data)
public function getShape(array $row_data)
{
$wkt = 'MULTILINESTRING(';
for ($i = 0; $i < $row_data['numparts']; $i++) {

View File

@ -82,7 +82,7 @@ class GisMultiPoint extends GisGeometry
$spatial,
$label,
$point_color,
$scale_data,
array $scale_data,
$image
) {
// allocate colors
@ -140,7 +140,7 @@ class GisMultiPoint extends GisGeometry
$spatial,
$label,
$point_color,
$scale_data,
array $scale_data,
$pdf
) {
// allocate colors
@ -187,7 +187,7 @@ class GisMultiPoint extends GisGeometry
* @return string the code related to a row in the GIS dataset
* @access public
*/
public function prepareRowAsSvg($spatial, $label, $point_color, $scale_data)
public function prepareRowAsSvg($spatial, $label, $point_color, array $scale_data)
{
$point_options = array(
'name' => $label,
@ -240,7 +240,7 @@ class GisMultiPoint extends GisGeometry
$srid,
$label,
$point_color,
$scale_data
array $scale_data
) {
$style_options = array(
'pointRadius' => 3,
@ -283,7 +283,7 @@ class GisMultiPoint extends GisGeometry
* @return string WKT with the set of parameters passed by the GIS editor
* @access public
*/
public function generateWkt($gis_data, $index, $empty = '')
public function generateWkt(array $gis_data, $index, $empty = '')
{
$no_of_points = isset($gis_data[$index]['MULTIPOINT']['no_of_points'])
? $gis_data[$index]['MULTIPOINT']['no_of_points'] : 1;
@ -319,7 +319,7 @@ class GisMultiPoint extends GisGeometry
* @return string the WKT for the data from ESRI shape files
* @access public
*/
public function getShape($row_data)
public function getShape(array $row_data)
{
$wkt = 'MULTIPOINT(';
for ($i = 0; $i < $row_data['numpoints']; $i++) {
@ -389,7 +389,7 @@ class GisMultiPoint extends GisGeometry
* @return string JavaScript for adding an array of points to OpenLayers
* @access protected
*/
protected function getPointsArrayForOpenLayers($points_arr, $srid)
protected function getPointsArrayForOpenLayers(array $points_arr, $srid)
{
$ol_array = 'new Array(';
foreach ($points_arr as $point) {

View File

@ -98,7 +98,7 @@ class GisMultiPolygon extends GisGeometry
$spatial,
$label,
$fill_color,
$scale_data,
array $scale_data,
$image
) {
// allocate colors
@ -173,7 +173,7 @@ class GisMultiPolygon extends GisGeometry
* @return TCPDF the modified TCPDF instance
* @access public
*/
public function prepareRowAsPdf($spatial, $label, $fill_color, $scale_data, $pdf)
public function prepareRowAsPdf($spatial, $label, $fill_color, array $scale_data, $pdf)
{
// allocate colors
$red = hexdec(mb_substr($fill_color, 1, 2));
@ -241,7 +241,7 @@ class GisMultiPolygon extends GisGeometry
* @return string the code related to a row in the GIS dataset
* @access public
*/
public function prepareRowAsSvg($spatial, $label, $fill_color, $scale_data)
public function prepareRowAsSvg($spatial, $label, $fill_color, array $scale_data)
{
$polygon_options = array(
'name' => $label,
@ -307,7 +307,7 @@ class GisMultiPolygon extends GisGeometry
* @return string JavaScript related to a row in the GIS dataset
* @access public
*/
public function prepareRowAsOl($spatial, $srid, $label, $fill_color, $scale_data)
public function prepareRowAsOl($spatial, $srid, $label, $fill_color, array $scale_data)
{
$style_options = array(
'strokeColor' => '#000000',
@ -349,7 +349,7 @@ class GisMultiPolygon extends GisGeometry
* @return string the code to draw the ring
* @access private
*/
private function _drawPath($polygon, $scale_data)
private function _drawPath($polygon, array $scale_data)
{
$points_arr = $this->extractPoints($polygon, $scale_data);
@ -373,7 +373,7 @@ class GisMultiPolygon extends GisGeometry
* @return string WKT with the set of parameters passed by the GIS editor
* @access public
*/
public function generateWkt($gis_data, $index, $empty = '')
public function generateWkt(array $gis_data, $index, $empty = '')
{
$data_row = $gis_data[$index]['MULTIPOLYGON'];
@ -441,7 +441,7 @@ class GisMultiPolygon extends GisGeometry
* @return string the WKT for the data from ESRI shape files
* @access public
*/
public function getShape($row_data)
public function getShape(array $row_data)
{
// Determines whether each line ring is an inner ring or an outer ring.
// If it's an inner ring get a point on the surface which can be used to

View File

@ -82,7 +82,7 @@ class GisPoint extends GisGeometry
$spatial,
$label,
$point_color,
$scale_data,
array $scale_data,
$image
) {
// allocate colors
@ -145,7 +145,7 @@ class GisPoint extends GisGeometry
$spatial,
$label,
$point_color,
$scale_data,
array $scale_data,
$pdf
) {
// allocate colors
@ -196,7 +196,7 @@ class GisPoint extends GisGeometry
* @return string the code related to a row in the GIS dataset
* @access public
*/
public function prepareRowAsSvg($spatial, $label, $point_color, $scale_data)
public function prepareRowAsSvg($spatial, $label, $point_color, array $scale_data)
{
$point_options = array(
'name' => $label,
@ -247,7 +247,7 @@ class GisPoint extends GisGeometry
$srid,
$label,
$point_color,
$scale_data
array $scale_data
) {
$style_options = array(
'pointRadius' => 3,
@ -291,7 +291,7 @@ class GisPoint extends GisGeometry
* @return string WKT with the set of parameters passed by the GIS editor
* @access public
*/
public function generateWkt($gis_data, $index, $empty = '')
public function generateWkt(array $gis_data, $index, $empty = '')
{
return 'POINT('
. ((isset($gis_data[$index]['POINT']['x'])
@ -311,7 +311,7 @@ class GisPoint extends GisGeometry
* @return string the WKT for the data from ESRI shape files
* @access public
*/
public function getShape($row_data)
public function getShape(array $row_data)
{
return 'POINT(' . (isset($row_data['x']) ? $row_data['x'] : '')
. ' ' . (isset($row_data['y']) ? $row_data['y'] : '') . ')';

View File

@ -90,7 +90,7 @@ class GisPolygon extends GisGeometry
$spatial,
$label,
$fill_color,
$scale_data,
array $scale_data,
$image
) {
// allocate colors
@ -156,7 +156,7 @@ class GisPolygon extends GisGeometry
* @return TCPDF the modified TCPDF instance
* @access public
*/
public function prepareRowAsPdf($spatial, $label, $fill_color, $scale_data, $pdf)
public function prepareRowAsPdf($spatial, $label, $fill_color, array $scale_data, $pdf)
{
// allocate colors
$red = hexdec(mb_substr($fill_color, 1, 2));
@ -213,7 +213,7 @@ class GisPolygon extends GisGeometry
* @return string the code related to a row in the GIS dataset
* @access public
*/
public function prepareRowAsSvg($spatial, $label, $fill_color, $scale_data)
public function prepareRowAsSvg($spatial, $label, $fill_color, array $scale_data)
{
$polygon_options = array(
'name' => $label,
@ -274,7 +274,7 @@ class GisPolygon extends GisGeometry
* @return string JavaScript related to a row in the GIS dataset
* @access public
*/
public function prepareRowAsOl($spatial, $srid, $label, $fill_color, $scale_data)
public function prepareRowAsOl($spatial, $srid, $label, $fill_color, array $scale_data)
{
$style_options = array(
'strokeColor' => '#000000',
@ -317,7 +317,7 @@ class GisPolygon extends GisGeometry
* @return string the code to draw the ring
* @access private
*/
private function _drawPath($polygon, $scale_data)
private function _drawPath($polygon, array $scale_data)
{
$points_arr = $this->extractPoints($polygon, $scale_data);
@ -341,7 +341,7 @@ class GisPolygon extends GisGeometry
* @return string WKT with the set of parameters passed by the GIS editor
* @access public
*/
public function generateWkt($gis_data, $index, $empty = '')
public function generateWkt(array $gis_data, $index, $empty = '')
{
$no_of_lines = isset($gis_data[$index]['POLYGON']['no_of_lines'])
? $gis_data[$index]['POLYGON']['no_of_lines'] : 1;
@ -395,7 +395,7 @@ class GisPolygon extends GisGeometry
* @access public
* @static
*/
public static function area($ring)
public static function area(array $ring)
{
$no_of_points = count($ring);
@ -433,7 +433,7 @@ class GisPolygon extends GisGeometry
* @access public
* @static
*/
public static function isOuterRing($ring)
public static function isOuterRing(array $ring)
{
// If area is negative then it's in clockwise orientation,
// i.e. it's an outer ring
@ -454,7 +454,7 @@ class GisPolygon extends GisGeometry
* @access public
* @static
*/
public static function isPointInsidePolygon($point, $polygon)
public static function isPointInsidePolygon(array $point, array $polygon)
{
// If first point is repeated at the end remove it
$last = count($polygon) - 1;
@ -515,7 +515,7 @@ class GisPolygon extends GisGeometry
* @access public
* @static
*/
public static function getPointOnSurface($ring)
public static function getPointOnSurface(array $ring)
{
// Find two consecutive distinct points.
for ($i = 0, $nb = count($ring) - 1; $i < $nb; $i++) {

View File

@ -82,7 +82,7 @@ class GisVisualization
*
* @access public
*/
public static function get($sql_query, $options, $row, $pos)
public static function get($sql_query, array $options, $row, $pos)
{
return new GisVisualization($sql_query, $options, $row, $pos);
}
@ -96,7 +96,7 @@ class GisVisualization
*
* @return GisVisualization
*/
public static function getByData($data, $options)
public static function getByData(array $data, array $options)
{
return new GisVisualization(null, $options, null, null, $data);
}
@ -120,16 +120,16 @@ class GisVisualization
/**
* Constructor. Stores user specified options.
*
* @param string $sql_query SQL to fetch raw data for visualization
* @param array $options Users specified options
* @param integer $row number of rows
* @param integer $pos start position
* @param array $data raw data. If set, parameters other than $options
* will be ignored
* @param string $sql_query SQL to fetch raw data for visualization
* @param array $options Users specified options
* @param integer $row number of rows
* @param integer $pos start position
* @param array|null $data raw data. If set, parameters other than $options
* will be ignored
*
* @access public
*/
private function __construct($sql_query, $options, $row, $pos, $data = null)
private function __construct($sql_query, array $options, $row, $pos, $data = null)
{
$this->_userSpecifiedSettings = $options;
if (isset($data)) {
@ -540,7 +540,7 @@ class GisVisualization
* @return array an array containing the scale, x and y offsets
* @access private
*/
private function _scaleDataSet($data)
private function _scaleDataSet(array $data)
{
$min_max = array();
$border = 15;
@ -631,7 +631,7 @@ class GisVisualization
* @return mixed the formatted array of data
* @access private
*/
private function _prepareDataSet($data, $scale_data, $format, $results)
private function _prepareDataSet(array $data, array $scale_data, $format, $results)
{
$color_number = 0;
@ -703,7 +703,7 @@ class GisVisualization
*
* @return void
*/
public function setUserSpecifiedSettings($userSpecifiedSettings)
public function setUserSpecifiedSettings(array $userSpecifiedSettings)
{
$this->_userSpecifiedSettings = $userSpecifiedSettings;
}

View File

@ -86,7 +86,7 @@ class Import
* @return void
* @access public
*/
public static function executeQuery($sql, $full, &$sql_data)
public static function executeQuery($sql, $full, array &$sql_data)
{
global $go_sql,
$sql_query, $my_die, $error, $reload,
@ -174,7 +174,7 @@ class Import
* @return void
* @access public
*/
public static function runQuery($sql = '', $full = '', &$sql_data = array())
public static function runQuery($sql = '', $full = '', array &$sql_data = array())
{
global $import_run_buffer, $go_sql, $complete_query, $display_query,
$sql_query, $error, $reload, $result, $msg,
@ -829,7 +829,7 @@ class Import
*
* @todo Handle the error case more elegantly
*/
public static function analyzeTable(&$table)
public static function analyzeTable(array &$table)
{
/* Get number of rows in table */
$numRows = count($table[self::ROWS]);
@ -919,20 +919,20 @@ class Import
* Builds and executes SQL statements to create the database and tables
* as necessary, as well as insert all the data.
*
* @param string $db_name Name of the database
* @param array &$tables Array of tables for the specified database
* @param array &$analyses Analyses of the tables
* @param array &$additional_sql Additional SQL statements to be executed
* @param array $options Associative array of options
* @param array &$sql_data 2-element array with sql data
* @param string $db_name Name of the database
* @param array &$tables Array of tables for the specified database
* @param array|null &$analyses Analyses of the tables
* @param array|null &$additional_sql Additional SQL statements to be executed
* @param array|null $options Associative array of options
* @param array &$sql_data 2-element array with sql data
*
* @return void
* @access public
*
* @link https://wiki.phpmyadmin.net/pma/Import
*/
public static function buildSql($db_name, &$tables, &$analyses = null,
&$additional_sql = null, $options = null, &$sql_data
public static function buildSql($db_name, array &$tables, &$analyses = null,
&$additional_sql = null, $options = null, array &$sql_data
) {
/* Needed to quell the beast that is Message */
$import_notice = null;
@ -1405,7 +1405,7 @@ class Import
*
* @return mixed
*/
public static function getMatchedRows($analyzed_sql_results = array())
public static function getMatchedRows(array $analyzed_sql_results = array())
{
$statement = $analyzed_sql_results['statement'];
@ -1440,7 +1440,7 @@ class Import
*
* @return string SQL query
*/
public static function getSimulatedUpdateQuery($analyzed_sql_results)
public static function getSimulatedUpdateQuery(array $analyzed_sql_results)
{
$table_references = Query::getTables(
$analyzed_sql_results['statement']
@ -1496,7 +1496,7 @@ class Import
*
* @return string SQL query
*/
public static function getSimulatedDeleteQuery($analyzed_sql_results)
public static function getSimulatedDeleteQuery(array $analyzed_sql_results)
{
$table_references = Query::getTables(
$analyzed_sql_results['statement']

View File

@ -116,7 +116,7 @@ class Index
*
* @param array $params parameters
*/
public function __construct($params = array())
public function __construct(array $params = array())
{
$this->set($params);
}
@ -263,7 +263,7 @@ class Index
*
* @return void
*/
public function addColumn($params)
public function addColumn(array $params)
{
if (isset($params['Column_name'])
&& strlen($params['Column_name']) > 0
@ -279,7 +279,7 @@ class Index
*
* @return void
*/
public function addColumns($columns)
public function addColumns(array $columns)
{
$_columns = array();
@ -327,7 +327,7 @@ class Index
*
* @return void
*/
public function set($params)
public function set(array $params)
{
if (isset($params['columns'])) {
$this->addColumns($params['columns']);

View File

@ -62,7 +62,7 @@ class IndexColumn
*
* @param array $params an array containing the parameters of the index column
*/
public function __construct($params = array())
public function __construct(array $params = array())
{
$this->set($params);
}
@ -74,7 +74,7 @@ class IndexColumn
*
* @return void
*/
public function set($params)
public function set(array $params)
{
if (isset($params['Column_name'])) {
$this->_name = $params['Column_name'];

View File

@ -37,7 +37,7 @@ class InsertEdit
* @return array $form_params array of insert/edit form parameters
*/
public static function getFormParametersForInsertForm($db, $table, $where_clauses,
$where_clause_array, $err_url
array $where_clause_array, $err_url
) {
$_form_params = array(
'db' => $db,
@ -87,7 +87,7 @@ class InsertEdit
* @return array $where_clauses, $result, $rows
*/
public static function analyzeWhereClauses(
$where_clause_array, $table, $db
array $where_clause_array, $table, $db
) {
$rows = array();
$result = array();
@ -126,8 +126,8 @@ class InsertEdit
*
* @return boolean $has_unique_condition
*/
public static function showEmptyResultMessageOrSetUniqueCondition($rows, $key_id,
$where_clause_array, $local_query, $result
public static function showEmptyResultMessageOrSetUniqueCondition(array $rows, $key_id,
array $where_clause_array, $local_query, array $result
) {
$has_unique_condition = false;
@ -195,7 +195,7 @@ class InsertEdit
*
* @return array Add some url parameters to $url_params array and return it
*/
public static function urlParamsInEditMode($url_params, $where_clause_array, $where_clause)
public static function urlParamsInEditMode(array $url_params, array $where_clause_array, $where_clause)
{
if (isset($where_clause)) {
foreach ($where_clause_array as $where_clause) {
@ -217,7 +217,7 @@ class InsertEdit
*
* @return string an HTML snippet
*/
public static function showTypeOrFunction($which, $url_params, $is_show)
public static function showTypeOrFunction($which, array $url_params, $is_show)
{
$params = array();
@ -278,7 +278,7 @@ class InsertEdit
*
* @return array description of column in given table
*/
public static function analyzeTableColumnsArray($column, $comments_map, $timestamp_seen)
public static function analyzeTableColumnsArray(array $column, array $comments_map, $timestamp_seen)
{
$column['Field_html'] = htmlspecialchars($column['Field']);
$column['Field_md5'] = md5($column['Field']);
@ -313,7 +313,7 @@ class InsertEdit
*
* @return string column title
*/
public static function getColumnTitle($column, $comments_map)
public static function getColumnTitle(array $column, array $comments_map)
{
if (isset($comments_map[$column['Field']])) {
return '<span style="border-bottom: 1px dashed black;" title="'
@ -334,7 +334,7 @@ class InsertEdit
*
* @return boolean whether the column's type if one of the $types
*/
public static function isColumn($column, $types)
public static function isColumn(array $column, array $types)
{
foreach ($types as $one_type) {
if (mb_stripos($column['Type'], $one_type) === 0) {
@ -352,7 +352,7 @@ class InsertEdit
*
* @return array $column['pma_type'], $column['wrap'], $column['first_timestamp']
*/
public static function getEnumSetAndTimestampColumns($column, $timestamp_seen)
public static function getEnumSetAndTimestampColumns(array $column, $timestamp_seen)
{
$column['first_timestamp'] = false;
switch ($column['True_Type']) {
@ -401,9 +401,9 @@ class InsertEdit
*
* @return string an html snippet
*/
public static function getFunctionColumn($column, $is_upload, $column_name_appendix,
$onChangeClause, $no_support_types, $tabindex_for_function,
$tabindex, $idindex, $insert_mode, $readOnly, $foreignData
public static function getFunctionColumn(array $column, $is_upload, $column_name_appendix,
$onChangeClause, array $no_support_types, $tabindex_for_function,
$tabindex, $idindex, $insert_mode, $readOnly, array $foreignData
) {
$html_output = '';
if (($GLOBALS['cfg']['ProtectBinary'] === 'blob'
@ -455,8 +455,8 @@ class InsertEdit
*
* @return string an html snippet
*/
public static function getNullColumn($column, $column_name_appendix, $real_null_value,
$tabindex, $tabindex_for_null, $idindex, $vkey, $foreigners, $foreignData,
public static function getNullColumn(array $column, $column_name_appendix, $real_null_value,
$tabindex, $tabindex_for_null, $idindex, $vkey, array $foreigners, array $foreignData,
$readOnly
) {
if ($column['Null'] != 'YES' || $readOnly) {
@ -504,7 +504,7 @@ class InsertEdit
*
* @return integer $nullify_code
*/
public static function getNullifyCodeForNullColumn($column, $foreigners, $foreignData)
public static function getNullifyCodeForNullColumn(array $column, array $foreigners, array $foreignData)
{
$foreigner = Relation::searchColumnInForeigners($foreigners, $column['Field']);
if (mb_strstr($column['True_Type'], 'enum')) {
@ -570,12 +570,12 @@ class InsertEdit
*
* @return string an html snippet
*/
public static function getValueColumn($column, $backup_field, $column_name_appendix,
public static function getValueColumn(array $column, $backup_field, $column_name_appendix,
$onChangeClause, $tabindex, $tabindex_for_value, $idindex, $data,
$special_chars, $foreignData, $paramTableDbArray, $rownumber,
$titles, $text_dir, $special_chars_encoded, $vkey,
$special_chars, array $foreignData, array $paramTableDbArray, $rownumber,
array $titles, $text_dir, $special_chars_encoded, $vkey,
$is_upload, $biggest_max_file_size,
$default_char_editing, $no_support_types, $gis_data_types, $extracted_columnspec,
$default_char_editing, array $no_support_types, array $gis_data_types, array $extracted_columnspec,
$readOnly
) {
// HTML5 data-* attribute data-type
@ -678,9 +678,9 @@ class InsertEdit
*
* @return string an html snippet
*/
public static function getForeignLink($column, $backup_field, $column_name_appendix,
public static function getForeignLink(array $column, $backup_field, $column_name_appendix,
$onChangeClause, $tabindex, $tabindex_for_value, $idindex, $data,
$paramTableDbArray, $rownumber, $titles, $readOnly
array $paramTableDbArray, $rownumber, array $titles, $readOnly
) {
list($table, $db) = $paramTableDbArray;
$html_output = '';
@ -728,7 +728,7 @@ class InsertEdit
*/
public static function dispRowForeignData($backup_field, $column_name_appendix,
$onChangeClause, $tabindex, $tabindex_for_value, $idindex, $data,
$foreignData, $readOnly
array $foreignData, $readOnly
) {
$html_output = '';
$html_output .= $backup_field . "\n";
@ -776,7 +776,7 @@ class InsertEdit
*
* @return string an html snippet
*/
public static function getTextarea($column, $backup_field, $column_name_appendix,
public static function getTextarea(array $column, $backup_field, $column_name_appendix,
$onChangeClause, $tabindex, $tabindex_for_value, $idindex,
$text_dir, $special_chars_encoded, $data_type, $readOnly
) {
@ -838,8 +838,8 @@ class InsertEdit
*
* @return string an html snippet
*/
public static function getPmaTypeEnum($column, $backup_field, $column_name_appendix,
$extracted_columnspec, $onChangeClause, $tabindex, $tabindex_for_value,
public static function getPmaTypeEnum(array $column, $backup_field, $column_name_appendix,
array $extracted_columnspec, $onChangeClause, $tabindex, $tabindex_for_value,
$idindex, $data, $readOnly
) {
$html_output = '';
@ -878,7 +878,7 @@ class InsertEdit
*
* @return array column values as an associative array
*/
public static function getColumnEnumValues($column, $extracted_columnspec)
public static function getColumnEnumValues(array $column, array $extracted_columnspec)
{
$column['values'] = array();
foreach ($extracted_columnspec['enum_set_values'] as $val) {
@ -906,8 +906,8 @@ class InsertEdit
* @return string an html snippet
*/
public static function getDropDownDependingOnLength(
$column, $column_name_appendix, $onChangeClause,
$tabindex, $tabindex_for_value, $idindex, $data, $column_enum_values,
array $column, $column_name_appendix, $onChangeClause,
$tabindex, $tabindex_for_value, $idindex, $data, array $column_enum_values,
$readOnly
) {
$html_output = '<select name="fields' . $column_name_appendix . '"'
@ -959,8 +959,8 @@ class InsertEdit
*/
public static function getRadioButtonDependingOnLength(
$column_name_appendix, $onChangeClause,
$tabindex, $column, $tabindex_for_value, $idindex, $data,
$column_enum_values, $readOnly
$tabindex, array $column, $tabindex_for_value, $idindex, $data,
array $column_enum_values, $readOnly
) {
$j = 0;
$html_output = '';
@ -1009,7 +1009,7 @@ class InsertEdit
* @return string an html snippet
*/
public static function getPmaTypeSet(
$column, $extracted_columnspec, $backup_field,
array $column, array $extracted_columnspec, $backup_field,
$column_name_appendix, $onChangeClause, $tabindex,
$tabindex_for_value, $idindex, $data, $readOnly
) {
@ -1058,7 +1058,7 @@ class InsertEdit
*
* @return array $column['values'], $column['select_size']
*/
public static function getColumnSetValueAndSelectSize($column, $extracted_columnspec)
public static function getColumnSetValueAndSelectSize(array $column, array $extracted_columnspec)
{
if (! isset($column['values'])) {
$column['values'] = array();
@ -1096,7 +1096,7 @@ class InsertEdit
* @return string an html snippet
*/
public static function getBinaryAndBlobColumn(
$column, $data, $special_chars, $biggest_max_file_size,
array $column, $data, $special_chars, $biggest_max_file_size,
$backup_field, $column_name_appendix, $onChangeClause, $tabindex,
$tabindex_for_value, $idindex, $text_dir, $special_chars_encoded,
$vkey, $is_upload, $readOnly
@ -1180,7 +1180,7 @@ class InsertEdit
* @return string an html snippet
*/
public static function getHtmlInput(
$column, $column_name_appendix, $special_chars, $fieldsize, $onChangeClause,
array $column, $column_name_appendix, $special_chars, $fieldsize, $onChangeClause,
$tabindex, $tabindex_for_value, $idindex, $data_type, $readOnly
) {
$input_type = 'text';
@ -1236,7 +1236,7 @@ class InsertEdit
*
* @return string|void an html snippet
*/
public static function getSelectOptionForUpload($vkey, $column)
public static function getSelectOptionForUpload($vkey, array $column)
{
$files = FileListing::getFileSelectOptions(
Util::userDir($GLOBALS['cfg']['UploadDir'])
@ -1267,7 +1267,7 @@ class InsertEdit
*
* @return array an html snippet and $biggest_max_file_size
*/
public static function getMaxUploadSize($column, $biggest_max_file_size)
public static function getMaxUploadSize(array $column, $biggest_max_file_size)
{
// find maximum upload size, based on field type
/**
@ -1323,11 +1323,11 @@ class InsertEdit
*
* @return string an html snippet
*/
public static function getValueColumnForOtherDatatypes($column, $default_char_editing,
public static function getValueColumnForOtherDatatypes(array $column, $default_char_editing,
$backup_field,
$column_name_appendix, $onChangeClause, $tabindex, $special_chars,
$tabindex_for_value, $idindex, $text_dir, $special_chars_encoded, $data,
$extracted_columnspec, $readOnly
array $extracted_columnspec, $readOnly
) {
// HTML5 data-* attribute data-type
$data_type = $GLOBALS['PMA_Types']->getTypeClass($column['True_Type']);
@ -1396,7 +1396,7 @@ class InsertEdit
*
* @return integer field size
*/
public static function getColumnSize($column, $extracted_columnspec)
public static function getColumnSize(array $column, array $extracted_columnspec)
{
if ($column['is_char']) {
$fieldsize = $extracted_columnspec['spec_in_brackets'];
@ -1446,7 +1446,7 @@ class InsertEdit
*
* @return string an html snippet
*/
public static function getContinueInsertionForm($table, $db, $where_clause_array, $err_url)
public static function getContinueInsertionForm($table, $db, array $where_clause_array, $err_url)
{
$html_output = '<form id="continueForm" method="post"'
. ' action="tbl_replace.php" name="continueForm">'
@ -1487,11 +1487,11 @@ class InsertEdit
/**
* Get action panel
*
* @param array $where_clause where clause
* @param string $after_insert insert mode, e.g. new_insert, same_insert
* @param integer $tabindex tab index
* @param integer $tabindex_for_value offset for the values tabindex
* @param boolean $found_unique_key boolean variable for unique key
* @param array|null $where_clause where clause
* @param string $after_insert insert mode, e.g. new_insert, same_insert
* @param integer $tabindex tab index
* @param integer $tabindex_for_value offset for the values tabindex
* @param boolean $found_unique_key boolean variable for unique key
*
* @return string an html snippet
*/
@ -1527,9 +1527,9 @@ class InsertEdit
/**
* Get a HTML drop down for submit types
*
* @param array $where_clause where clause
* @param integer $tabindex tab index
* @param integer $tabindex_for_value offset for the values tabindex
* @param array|null $where_clause where clause
* @param integer $tabindex tab index
* @param integer $tabindex_for_value offset for the values tabindex
*
* @return string an html snippet
*/
@ -1556,9 +1556,9 @@ class InsertEdit
/**
* Get HTML drop down for after insert
*
* @param array $where_clause where clause
* @param string $after_insert insert mode, e.g. new_insert, same_insert
* @param boolean $found_unique_key boolean variable for unique key
* @param array|null $where_clause where clause
* @param string $after_insert insert mode, e.g. new_insert, same_insert
* @param boolean $found_unique_key boolean variable for unique key
*
* @return string an html snippet
*/
@ -1642,7 +1642,7 @@ class InsertEdit
*
* @return string an html snippet
*/
public static function getHeadAndFootOfInsertRowTable($url_params)
public static function getHeadAndFootOfInsertRowTable(array $url_params)
{
$html_output = '<div class="responsivetable">'
. '<table class="insertRowTable topmargin">'
@ -1688,8 +1688,8 @@ class InsertEdit
* $special_chars_encoded
*/
public static function getSpecialCharsAndBackupFieldForExistingRow(
$current_row, $column, $extracted_columnspec,
$real_null_value, $gis_data_types, $column_name_appendix, $as_is
array $current_row, array $column, array $extracted_columnspec,
$real_null_value, array $gis_data_types, $column_name_appendix, $as_is
) {
$special_chars_encoded = '';
$data = null;
@ -1784,7 +1784,7 @@ class InsertEdit
* $backup_field, $special_chars_encoded
*/
public static function getSpecialCharsAndBackupFieldForInsertingMode(
$column, $real_null_value
array $column, $real_null_value
) {
if (! isset($column['Default'])) {
$column['Default'] = '';
@ -1957,7 +1957,7 @@ class InsertEdit
*
* @return string error url for query failure
*/
public static function getErrorUrl($url_params)
public static function getErrorUrl(array $url_params)
{
if (isset($_REQUEST['err_url'])) {
return $_REQUEST['err_url'];
@ -1975,7 +1975,7 @@ class InsertEdit
*
* @return array of query
*/
public static function buildSqlQuery($is_insertignore, $query_fields, $value_sets)
public static function buildSqlQuery($is_insertignore, array $query_fields, array $value_sets)
{
if ($is_insertignore) {
$insert_command = 'INSERT IGNORE ';
@ -2001,7 +2001,7 @@ class InsertEdit
* @return array $url_params, $total_affected_rows, $last_messages
* $warning_messages, $error_messages, $return_to_sql_query
*/
public static function executeSqlQuery($url_params, $query)
public static function executeSqlQuery(array $url_params, array $query)
{
$return_to_sql_query = '';
if (! empty($GLOBALS['sql_query'])) {
@ -2090,7 +2090,7 @@ class InsertEdit
* @return string $dispval display value from the foreign table
*/
public static function getDisplayValueForForeignTableColumn($where_comparison,
$map, $relation_field
array $map, $relation_field
) {
$foreigner = Relation::searchColumnInForeigners($map, $relation_field);
$display_field = Relation::getDisplayField(
@ -2132,7 +2132,7 @@ class InsertEdit
*
* @return string $output HTML <a> tag
*/
public static function getLinkForRelationalDisplayField($map, $relation_field,
public static function getLinkForRelationalDisplayField(array $map, $relation_field,
$where_comparison, $dispval, $relation_field_value
) {
$foreigner = Relation::searchColumnInForeigners($map, $relation_field);
@ -2186,7 +2186,7 @@ class InsertEdit
* @return array $extra_data
*/
public static function transformEditedValues($db, $table,
$transformation, &$edited_values, $file, $column_name, $extra_data, $type
array $transformation, array &$edited_values, $file, $column_name, array $extra_data, $type
) {
$include_file = 'libraries/classes/Plugins/Transformations/' . $file;
if (is_file($include_file)) {
@ -2236,7 +2236,7 @@ class InsertEdit
*
* @return array $cur_value
*/
public static function getCurrentValueAsAnArrayForMultipleEdit( $multi_edit_funcs,
public static function getCurrentValueAsAnArrayForMultipleEdit($multi_edit_funcs,
$multi_edit_salt,
$gis_from_text_functions, $current_value, $gis_from_wkb_functions,
$func_optional_param, $func_no_param, $key
@ -2300,7 +2300,7 @@ class InsertEdit
*/
public static function getQueryValuesForInsertAndUpdateInMultipleEdit($multi_edit_columns_name,
$multi_edit_columns_null, $current_value, $multi_edit_columns_prev,
$multi_edit_funcs,$is_insert, $query_values, $query_fields,
$multi_edit_funcs, $is_insert, $query_values, $query_fields,
$current_value_as_an_array, $value_sets, $key, $multi_edit_columns_null_prev
) {
// i n s e r t
@ -2479,7 +2479,7 @@ class InsertEdit
* @return void
*/
public static function verifyWhetherValueCanBeTruncatedAndAppendExtraData(
$db, $table, $column_name, &$extra_data
$db, $table, $column_name, array &$extra_data
) {
$extra_data['isNeedToRecheck'] = false;
@ -2668,7 +2668,7 @@ class InsertEdit
*
* @return String
*/
public static function getHtmlForFunctionOption($column, $column_name_appendix)
public static function getHtmlForFunctionOption(array $column, $column_name_appendix)
{
return '<tr class="noclick">'
. '<td '
@ -2687,7 +2687,7 @@ class InsertEdit
*
* @return string
*/
public static function getHtmlForInsertEditColumnType($column)
public static function getHtmlForInsertEditColumnType(array $column)
{
return '<td class="center' . $column['wrap'] . '">'
. '<span class="column_type" dir="ltr">' . $column['pma_type'] . '</span>'
@ -2752,13 +2752,13 @@ class InsertEdit
*
* @return string
*/
public static function getHtmlForInsertEditFormColumn($table_columns, $column_number,
$comments_map, $timestamp_seen, $current_result, $chg_evt_handler,
$jsvkey, $vkey, $insert_mode, $current_row, &$o_rows,
public static function getHtmlForInsertEditFormColumn(array $table_columns, $column_number,
array $comments_map, $timestamp_seen, $current_result, $chg_evt_handler,
$jsvkey, $vkey, $insert_mode, array $current_row, &$o_rows,
&$tabindex, $columns_cnt, $is_upload, $tabindex_for_function,
$foreigners, $tabindex_for_null, $tabindex_for_value, $table, $db,
$row_id, $titles, $biggest_max_file_size, $default_char_editing,
$text_dir, $repopulate, $column_mime, $where_clause
array $foreigners, $tabindex_for_null, $tabindex_for_value, $table, $db,
$row_id, array $titles, $biggest_max_file_size, $default_char_editing,
$text_dir, array $repopulate, array $column_mime, $where_clause
) {
$column = $table_columns[$column_number];
$readOnly = false;
@ -2979,12 +2979,12 @@ class InsertEdit
*
* @return string
*/
public static function getHtmlForInsertEditRow($url_params, $table_columns,
$comments_map, $timestamp_seen, $current_result, $chg_evt_handler,
$jsvkey, $vkey, $insert_mode, $current_row, &$o_rows, &$tabindex, $columns_cnt,
$is_upload, $tabindex_for_function, $foreigners, $tabindex_for_null,
$tabindex_for_value, $table, $db, $row_id, $titles,
$biggest_max_file_size, $text_dir, $repopulate, $where_clause_array
public static function getHtmlForInsertEditRow(array $url_params, array $table_columns,
array $comments_map, $timestamp_seen, $current_result, $chg_evt_handler,
$jsvkey, $vkey, $insert_mode, array $current_row, &$o_rows, &$tabindex, $columns_cnt,
$is_upload, $tabindex_for_function, array $foreigners, $tabindex_for_null,
$tabindex_for_value, $table, $db, $row_id, array $titles,
$biggest_max_file_size, $text_dir, array $repopulate, array $where_clause_array
) {
$html_output = self::getHeadAndFootOfInsertRowTable($url_params)
. '<tbody>';
@ -3028,7 +3028,7 @@ class InsertEdit
*
* @return boolean whether user has necessary privileges
*/
public static function userHasColumnPrivileges($table_column, $insert_mode)
public static function userHasColumnPrivileges(array $table_column, $insert_mode)
{
$privileges = $table_column['Privileges'];
return ($insert_mode && strstr($privileges, 'insert') !== false)

View File

@ -69,7 +69,7 @@ class Linter
*
* @return array
*/
public static function findLineNumberAndColumn($lines, $pos)
public static function findLineNumberAndColumn(array $lines, $pos)
{
$line = 0;
foreach ($lines as $lineNo => $lineStart) {

View File

@ -36,7 +36,7 @@ abstract class ListAbstract extends ArrayObject
* ArrayIterator is the default class used.
*/
public function __construct(
$array = array(), $flags = 0, $iterator_class = "ArrayIterator"
array $array = array(), $flags = 0, $iterator_class = "ArrayIterator"
) {
parent::__construct($array, $flags, $iterator_class);
}

View File

@ -137,7 +137,7 @@ class Message
* constant definitions above
*/
public function __construct($string = '', $number = Message::NOTICE,
$params = array(), $sanitize = Message::SANITIZE_NONE
array $params = array(), $sanitize = Message::SANITIZE_NONE
) {
$this->setString($string, $sanitize & Message::SANITIZE_STRING);
$this->setNumber($number);

View File

@ -27,20 +27,20 @@ class MultSubmits
/**
* Gets url params
*
* @param string $what mult submit type
* @param bool $reload is reload
* @param string $action action type
* @param string $db database name
* @param string $table table name
* @param array $selected selected rows(table,db)
* @param array $views table views
* @param string $original_sql_query original sql query
* @param string $original_url_query original url query
* @param string $what mult submit type
* @param bool $reload is reload
* @param string $action action type
* @param string $db database name
* @param string $table table name
* @param array $selected selected rows(table,db)
* @param array|null $views table views
* @param string $original_sql_query original sql query
* @param string $original_url_query original url query
*
* @return array
*/
public static function getUrlParams(
$what, $reload, $action, $db, $table, $selected, $views,
$what, $reload, $action, $db, $table, array $selected, $views,
$original_sql_query, $original_url_query
) {
$_url_params = array(
@ -82,19 +82,19 @@ class MultSubmits
/**
* Builds or execute queries for multiple elements, depending on $query_type
*
* @param string $query_type query type
* @param array $selected selected tables
* @param string $db db name
* @param string $table table name
* @param array $views table views
* @param string $primary table primary
* @param string $from_prefix from prefix original
* @param string $to_prefix to prefix original
* @param string $query_type query type
* @param array $selected selected tables
* @param string $db db name
* @param string $table table name
* @param array|null $views table views
* @param string $primary table primary
* @param string $from_prefix from prefix original
* @param string $to_prefix to prefix original
*
* @return array
*/
public static function buildOrExecuteQueryForMulti(
$query_type, $selected, $db, $table, $views, $primary,
$query_type, array $selected, $db, $table, $views, $primary,
$from_prefix, $to_prefix
) {
$rebuild_database_list = false;
@ -337,7 +337,7 @@ class MultSubmits
*
* @return string
*/
public static function getHtmlForCopyMultipleTables($action, $_url_params)
public static function getHtmlForCopyMultipleTables($action, array $_url_params)
{
$html = '<form id="ajax_form" action="' . $action . '" method="post">';
$html .= Url::getHiddenInputs($_url_params);
@ -382,7 +382,7 @@ class MultSubmits
*
* @return string
*/
public static function getHtmlForReplacePrefixTable($action, $_url_params)
public static function getHtmlForReplacePrefixTable($action, array $_url_params)
{
$html = '<form id="ajax_form" action="' . $action . '" method="post">';
$html .= Url::getHiddenInputs($_url_params);
@ -416,7 +416,7 @@ class MultSubmits
*
* @return string
*/
public static function getHtmlForAddPrefixTable($action, $_url_params)
public static function getHtmlForAddPrefixTable($action, array $_url_params)
{
$html = '<form id="ajax_form" action="' . $action . '" method="post">';
$html .= Url::getHiddenInputs($_url_params);
@ -447,7 +447,7 @@ class MultSubmits
*
* @return string
*/
public static function getHtmlForOtherActions($what, $action, $_url_params, $full_query)
public static function getHtmlForOtherActions($what, $action, array $_url_params, $full_query)
{
$html = '<form action="' . $action . '" method="post">';
$html .= Url::getHiddenInputs($_url_params);
@ -487,7 +487,7 @@ class MultSubmits
*
* @return array
*/
public static function getQueryFromSelected($what, $table, $selected, $views)
public static function getQueryFromSelected($what, $table, array $selected, array $views)
{
$reload = false;
$full_query_views = null;

View File

@ -327,7 +327,7 @@ class NavigationTree
*
* @return Node|false The active node or false in case of failure
*/
private function _buildPathPart($path, $type2, $pos2, $type3, $pos3)
private function _buildPathPart(array $path, $type2, $pos2, $type3, $pos3)
{
if (empty($pos2)) {
$pos2 = 0;
@ -1002,7 +1002,7 @@ class NavigationTree
*
* @return boolean
*/
private function _findTreeMatch($tree, $paths)
private function _findTreeMatch(array $tree, array $paths)
{
$match = false;
foreach ($tree as $path) {

View File

@ -84,7 +84,7 @@ class Normalization
* @return string HTML
*/
public static function getHtmlForCreateNewColumn(
$num_fields, $db, $table, $columnMeta=array()
$num_fields, $db, $table, array $columnMeta = array()
) {
$cfgRelation = Relation::getRelationsParam();
$content_cells = array();
@ -415,7 +415,7 @@ class Normalization
*
* @return string HTML
*/
public static function getHtmlForNewTables2NF($partialDependencies,$table)
public static function getHtmlForNewTables2NF(array $partialDependencies, $table)
{
$html = '<p><b>' . sprintf(
__(
@ -448,7 +448,7 @@ class Normalization
*
* @return array
*/
public static function createNewTablesFor2NF($partialDependencies, $tablesName, $table, $db)
public static function createNewTablesFor2NF(array $partialDependencies, $tablesName, $table, $db)
{
$dropCols = false;
$nonPKCols = array();
@ -524,7 +524,7 @@ class Normalization
*
* @return array containing html and the list of new tables
*/
public static function getHtmlForNewTables3NF($dependencies, $tables, $db)
public static function getHtmlForNewTables3NF($dependencies, array $tables, $db)
{
$html = "";
$i = 1;
@ -582,7 +582,7 @@ class Normalization
*
* @return array
*/
public static function createNewTablesFor3NF($newTables, $db)
public static function createNewTablesFor3NF(array $newTables, $db)
{
$queries = array();
$dropCols = false;
@ -730,7 +730,7 @@ class Normalization
*
* @return string
*/
public static function getHtmlFor3NFstep1($db, $tables)
public static function getHtmlFor3NFstep1($db, array $tables)
{
$legendText = __('Step 3.') . "1 " . __('Find transitive dependencies');
$extra = "";
@ -952,7 +952,7 @@ class Normalization
*
* @return array associative array containing the count
*/
public static function findDistinctValuesCount($columns, $table)
public static function findDistinctValuesCount(array $columns, $table)
{
$result = array();
$query = 'SELECT ';
@ -981,7 +981,7 @@ class Normalization
*
* @return array containing all the possible partial keys(subset of primary key)
*/
public static function getAllCombinationPartialKeys($primaryKey)
public static function getAllCombinationPartialKeys(array $primaryKey)
{
$results = array('');
foreach ($primaryKey as $element) {

View File

@ -406,7 +406,7 @@ class Operations
* @return array $views
*/
public static function getViewsAndCreateSqlViewStandIn(
$tables_full, $export_sql_plugin, $db
array $tables_full, $export_sql_plugin, $db
) {
$views = array();
foreach ($tables_full as $each_table => $tmp) {
@ -450,7 +450,7 @@ class Operations
*
* @return array SQL queries for the constraints
*/
public static function copyTables($tables_full, $move, $db)
public static function copyTables(array $tables_full, $move, $db)
{
$sqlContraints = array();
foreach ($tables_full as $each_table => $tmp) {
@ -546,7 +546,7 @@ class Operations
*
* @return void
*/
public static function handleTheViews($views, $move, $db)
public static function handleTheViews(array $views, $move, $db)
{
// temporarily force to add DROP IF EXIST to CREATE VIEW query,
// to remove stand-in VIEW that was created earlier
@ -735,7 +735,7 @@ class Operations
*
* @return void
*/
public static function createAllAccumulatedConstraints($sqlConstratints)
public static function createAllAccumulatedConstraints(array $sqlConstratints)
{
$GLOBALS['dbi']->selectDb($_REQUEST['newname']);
foreach ($sqlConstratints as $one_query) {
@ -773,7 +773,7 @@ class Operations
*
* @return string $html_out
*/
public static function getHtmlForOrderTheTable($columns)
public static function getHtmlForOrderTheTable(array $columns)
{
$html_output = '<div>';
$html_output .= '<form method="post" id="alterTableOrderby" '
@ -1338,7 +1338,7 @@ class Operations
*
* @return string $html_output
*/
public static function getHtmlForTableMaintenance($pma_table, $url_params)
public static function getHtmlForTableMaintenance($pma_table, array $url_params)
{
$html_output = '<div>';
$html_output .= '<fieldset>'
@ -1363,7 +1363,7 @@ class Operations
*
* @return string $html_output
*/
public static function getListofMaintainActionLink($pma_table, $url_params)
public static function getListofMaintainActionLink($pma_table, array $url_params)
{
$html_output = '';
@ -1485,7 +1485,7 @@ class Operations
*
* @return string $html_output
*/
public static function getMaintainActionlink($action_message, $params, $url_params, $link)
public static function getMaintainActionlink($action_message, array $params, array $url_params, $link)
{
return '<li>'
. '<a class="maintain_action ajax" '
@ -1506,8 +1506,8 @@ class Operations
* @return string $html_output
*/
public static function getHtmlForDeleteDataOrTable(
$truncate_table_url_params,
$dropTableUrlParams
array $truncate_table_url_params,
array $dropTableUrlParams
) {
$html_output = '<div>'
. '<fieldset class="caution">'
@ -1546,7 +1546,7 @@ class Operations
*
* @return String html output
*/
public static function getDeleteDataOrTablelink($url_params, $syntax, $link, $htmlId)
public static function getDeleteDataOrTablelink(array $url_params, $syntax, $link, $htmlId)
{
return '<li><a '
. 'href="sql.php' . Url::getCommon($url_params) . '"'
@ -1564,7 +1564,7 @@ class Operations
*
* @return string $html_output
*/
public static function getHtmlForPartitionMaintenance($partition_names, $url_params)
public static function getHtmlForPartitionMaintenance(array $partition_names, array $url_params)
{
$choices = array(
'ANALYZE' => __('Analyze'),
@ -1652,7 +1652,7 @@ class Operations
*
* @return string $html_output
*/
public static function getHtmlForReferentialIntegrityCheck($foreign, $url_params)
public static function getHtmlForReferentialIntegrityCheck(array $foreign, array $url_params)
{
$html_output = '<div>'
. '<fieldset>'

View File

@ -32,7 +32,7 @@ class Partition extends SubPartition
*
* @return void
*/
protected function loadData($row)
protected function loadData(array $row)
{
$this->name = $row['PARTITION_NAME'];
$this->ordinal = $row['PARTITION_ORDINAL_POSITION'];

View File

@ -206,7 +206,7 @@ class Plugins
*
* @return string html select tag
*/
public static function getChoice($section, $name, &$list, $cfgname = null)
public static function getChoice($section, $name, array &$list, $cfgname = null)
{
if (! isset($cfgname)) {
$cfgname = $name;
@ -527,7 +527,7 @@ class Plugins
*
* @return string html fieldset with plugin options
*/
public static function getOptions($section, &$list)
public static function getOptions($section, array &$list)
{
$ret = '';
// Options for plugins that support them

View File

@ -187,7 +187,7 @@ class ExportCodegen extends ExportPlugin
$crlf,
$error_url,
$sql_query,
$aliases = array()
array $aliases = array()
) {
$CG_FORMATS = $this->_getCgFormats();
$CG_HANDLERS = $this->_getCgHandlers();
@ -237,7 +237,7 @@ class ExportCodegen extends ExportPlugin
*
* @return string containing C# code lines, separated by "\n"
*/
private function _handleNHibernateCSBody($db, $table, $crlf, $aliases = array())
private function _handleNHibernateCSBody($db, $table, $crlf, array $aliases = array())
{
$db_alias = $db;
$table_alias = $table;
@ -340,7 +340,7 @@ class ExportCodegen extends ExportPlugin
$db,
$table,
$crlf,
$aliases = array()
array $aliases = array()
) {
$db_alias = $db;
$table_alias = $table;
@ -415,7 +415,7 @@ class ExportCodegen extends ExportPlugin
*
* @return void
*/
private function _setCgFormats($CG_FORMATS)
private function _setCgFormats(array $CG_FORMATS)
{
$this->_cgFormats = $CG_FORMATS;
}
@ -437,7 +437,7 @@ class ExportCodegen extends ExportPlugin
*
* @return void
*/
private function _setCgHandlers($CG_HANDLERS)
private function _setCgHandlers(array $CG_HANDLERS)
{
$this->_cgHandlers = $CG_HANDLERS;
}

View File

@ -217,7 +217,7 @@ class ExportCsv extends ExportPlugin
$crlf,
$error_url,
$sql_query,
$aliases = array()
array $aliases = array()
) {
global $what, $csv_terminated, $csv_separator, $csv_enclosed, $csv_escaped;

View File

@ -197,7 +197,7 @@ class ExportHtmlword extends ExportPlugin
$crlf,
$error_url,
$sql_query,
$aliases = array()
array $aliases = array()
) {
global $what;
@ -359,7 +359,7 @@ class ExportHtmlword extends ExportPlugin
$do_comments,
$do_mime,
$view = false,
$aliases = array()
array $aliases = array()
) {
// set $cfgRelation here, because there is a chance that it's modified
// since the class initialization
@ -549,7 +549,7 @@ class ExportHtmlword extends ExportPlugin
$do_comments = false,
$do_mime = false,
$dates = false,
$aliases = array()
array $aliases = array()
) {
$db_alias = $db;
$table_alias = $table;
@ -619,8 +619,8 @@ class ExportHtmlword extends ExportPlugin
* @return string Formatted column definition
*/
protected function formatOneColumnDefinition(
$column,
$unique_keys,
array $column,
array $unique_keys,
$col_alias = ''
) {
if (empty($col_alias)) {

View File

@ -206,7 +206,7 @@ class ExportJson extends ExportPlugin
$crlf,
$error_url,
$sql_query,
$aliases = array()
array $aliases = array()
) {
$db_alias = $db;
$table_alias = $table;

View File

@ -301,7 +301,7 @@ class ExportLatex extends ExportPlugin
$crlf,
$error_url,
$sql_query,
$aliases = array()
array $aliases = array()
) {
$db_alias = $db;
$table_alias = $table;
@ -466,7 +466,7 @@ class ExportLatex extends ExportPlugin
$do_comments = false,
$do_mime = false,
$dates = false,
$aliases = array()
array $aliases = array()
) {
$db_alias = $db;
$table_alias = $table;

View File

@ -189,7 +189,7 @@ class ExportMediawiki extends ExportPlugin
$do_comments = false,
$do_mime = false,
$dates = false,
$aliases = array()
array $aliases = array()
) {
$db_alias = $db;
$table_alias = $table;
@ -283,7 +283,7 @@ class ExportMediawiki extends ExportPlugin
$crlf,
$error_url,
$sql_query,
$aliases = array()
array $aliases = array()
) {
$db_alias = $db;
$table_alias = $table;

View File

@ -218,7 +218,7 @@ class ExportOds extends ExportPlugin
$crlf,
$error_url,
$sql_query,
$aliases = array()
array $aliases = array()
) {
global $what;

View File

@ -246,7 +246,7 @@ class ExportOdt extends ExportPlugin
$crlf,
$error_url,
$sql_query,
$aliases = array()
array $aliases = array()
) {
global $what;
@ -441,7 +441,7 @@ class ExportOdt extends ExportPlugin
$show_dates = false,
$add_semicolon = true,
$view = false,
$aliases = array()
array $aliases = array()
) {
global $cfgRelation;
@ -590,7 +590,7 @@ class ExportOdt extends ExportPlugin
*
* @return bool true
*/
protected function getTriggers($db, $table, $aliases = array())
protected function getTriggers($db, $table, array $aliases = array())
{
$db_alias = $db;
$table_alias = $table;
@ -679,7 +679,7 @@ class ExportOdt extends ExportPlugin
$do_comments = false,
$do_mime = false,
$dates = false,
$aliases = array()
array $aliases = array()
) {
$db_alias = $db;
$table_alias = $table;

View File

@ -215,7 +215,7 @@ class ExportPdf extends ExportPlugin
$crlf,
$error_url,
$sql_query,
$aliases = array()
array $aliases = array()
) {
$db_alias = $db;
$table_alias = $table;
@ -269,7 +269,7 @@ class ExportPdf extends ExportPlugin
$do_comments = false,
$do_mime = false,
$dates = false,
$aliases = array()
array $aliases = array()
) {
$db_alias = $db;
$table_alias = $table;

View File

@ -174,7 +174,7 @@ class ExportPhparray extends ExportPlugin
$crlf,
$error_url,
$sql_query,
$aliases = array()
array $aliases = array()
) {
$db_alias = $db;
$table_alias = $table;

View File

@ -484,7 +484,7 @@ class ExportSql extends ExportPlugin
* @return string SQL query
*/
protected function _exportRoutineSQL(
$db, $aliases, $type, $name, $routines, $delimiter
$db, array $aliases, $type, $name, array $routines, $delimiter
) {
global $crlf;
@ -536,7 +536,7 @@ class ExportSql extends ExportPlugin
*
* @return bool Whether it succeeded
*/
public function exportRoutines($db, $aliases = array())
public function exportRoutines($db, array $aliases = array())
{
global $crlf;
@ -996,7 +996,7 @@ class ExportSql extends ExportPlugin
public function exportMetadata(
$db,
$tables,
$metadataTypes
array $metadataTypes
) {
$cfgRelation = Relation::getRelationsParam();
if (!isset($cfgRelation['db'])) {
@ -1048,7 +1048,7 @@ class ExportSql extends ExportPlugin
private function _exportMetadata(
$db,
$table,
$metadataTypes
array $metadataTypes
) {
$cfgRelation = Relation::getRelationsParam();
@ -1274,7 +1274,7 @@ class ExportSql extends ExportPlugin
$view,
$crlf,
$add_semicolon = true,
$aliases = array()
array $aliases = array()
) {
$db_alias = $db;
$view_alias = $view;
@ -1368,7 +1368,7 @@ class ExportSql extends ExportPlugin
$add_semicolon = true,
$view = false,
$update_indexes_increments = true,
$aliases = array()
array $aliases = array()
) {
global $sql_drop_table, $sql_backquotes, $sql_constraints,
$sql_constraints_query, $sql_indexes, $sql_indexes_query,
@ -1828,7 +1828,7 @@ class ExportSql extends ExportPlugin
$crlf,
$do_relation = false,
$do_mime = false,
$aliases = array()
array $aliases = array()
) {
global $cfgRelation, $sql_backquotes;
@ -1978,7 +1978,7 @@ class ExportSql extends ExportPlugin
$comments = false,
$mime = false,
$dates = false,
$aliases = array()
array $aliases = array()
) {
$db_alias = $db;
$table_alias = $table;
@ -2152,7 +2152,7 @@ class ExportSql extends ExportPlugin
$crlf,
$error_url,
$sql_query,
$aliases = array()
array $aliases = array()
) {
global $current_row, $sql_backquotes;
@ -2646,7 +2646,7 @@ class ExportSql extends ExportPlugin
*/
public function replaceWithAliases(
$sql_query,
$aliases,
array $aliases,
$db,
$table = '',
&$flag = null

View File

@ -181,7 +181,7 @@ class ExportTexytext extends ExportPlugin
$crlf,
$error_url,
$sql_query,
$aliases = array()
array $aliases = array()
) {
global $what;
@ -341,7 +341,7 @@ class ExportTexytext extends ExportPlugin
$show_dates = false,
$add_semicolon = true,
$view = false,
$aliases = array()
array $aliases = array()
) {
global $cfgRelation;
@ -504,7 +504,7 @@ class ExportTexytext extends ExportPlugin
$do_comments = false,
$do_mime = false,
$dates = false,
$aliases = array()
array $aliases = array()
) {
$db_alias = $db;
$table_alias = $table;

View File

@ -177,7 +177,7 @@ class ExportXml extends ExportPlugin
*
* @return string XML with definitions
*/
private function _exportDefinitions($db, $type, $dbitype, $names)
private function _exportDefinitions($db, $type, $dbitype, array $names)
{
global $crlf;
@ -465,7 +465,7 @@ class ExportXml extends ExportPlugin
$crlf,
$error_url,
$sql_query,
$aliases = array()
array $aliases = array()
) {
// Do not export data for merge tables
if ($GLOBALS['dbi']->getTable($db, $table)->isMerge()) {
@ -571,7 +571,7 @@ class ExportXml extends ExportPlugin
*
* @return void
*/
private function _setTables($tables)
private function _setTables(array $tables)
{
$this->_tables = $tables;
}

View File

@ -150,7 +150,7 @@ class ExportYaml extends ExportPlugin
$crlf,
$error_url,
$sql_query,
$aliases = array()
array $aliases = array()
) {
$db_alias = $db;
$table_alias = $table;

View File

@ -261,7 +261,7 @@ class Pdf extends PdfLib
*
* @return void
*/
public function setAttributes($attr = array())
public function setAttributes(array $attr = array())
{
foreach ($attr as $key => $val) {
$this->$key = $val;
@ -436,7 +436,7 @@ class Pdf extends PdfLib
$do_comments,
$do_mime,
$view = false,
$aliases = array()
array $aliases = array()
) {
// set $cfgRelation here, because there is a chance that it's modified
// since the class initialization

View File

@ -65,7 +65,7 @@ class TableProperty
*
* @param array $row table row
*/
public function __construct($row)
public function __construct(array $row)
{
$this->name = trim($row[0]);
$this->type = trim($row[1]);

View File

@ -94,7 +94,7 @@ abstract class ExportPlugin
$crlf,
$error_url,
$sql_query,
$aliases = array()
array $aliases = array()
);
/**
@ -110,7 +110,7 @@ abstract class ExportPlugin
*
* @return bool Whether it succeeded
*/
public function exportRoutines($db, $aliases = array())
public function exportRoutines($db, array $aliases = array())
{
;
}
@ -160,7 +160,7 @@ abstract class ExportPlugin
$comments = false,
$mime = false,
$dates = false,
$aliases = array()
array $aliases = array()
) {
;
}
@ -177,7 +177,7 @@ abstract class ExportPlugin
public function exportMetadata(
$db,
$tables,
$metadataTypes
array $metadataTypes
) {
;
}
@ -278,7 +278,7 @@ abstract class ExportPlugin
*
* @return string alias of the identifier if found or ''
*/
public function getAlias($aliases, $id, $type = 'dbtblcol', $db = '', $tbl = '')
public function getAlias(array $aliases, $id, $type = 'dbtblcol', $db = '', $tbl = '')
{
if (!empty($db) && isset($aliases[$db])) {
$aliases = array(
@ -344,10 +344,10 @@ abstract class ExportPlugin
* @return string the Relation string
*/
public function getRelationString(
$res_rel,
array $res_rel,
$field_name,
$db,
$aliases = array()
array $aliases = array()
) {
$relation = '';
$foreigner = Relation::searchColumnInForeigners($res_rel, $field_name);

View File

@ -39,10 +39,10 @@ abstract class IOTransformationsPlugin extends TransformationsPlugin
* @return string the html for input field
*/
public function getInputHtml(
$column,
array $column,
$row_id,
$column_name_appendix,
$options,
array $options,
$value,
$text_dir,
$tabindex,

View File

@ -96,7 +96,7 @@ class ImportCsv extends AbstractImportCsv
*
* @return void
*/
public function doImport(&$sql_data = array())
public function doImport(array &$sql_data = array())
{
global $db, $table, $csv_terminated, $csv_enclosed, $csv_escaped,
$csv_new_line, $csv_columns, $err_url;

View File

@ -96,7 +96,7 @@ class ImportLdi extends AbstractImportCsv
*
* @return void
*/
public function doImport(&$sql_data = array())
public function doImport(array &$sql_data = array())
{
global $finished, $import_file, $charset_conversion, $table;
global $ldi_local_option, $ldi_replace, $ldi_ignore, $ldi_terminated,

View File

@ -66,7 +66,7 @@ class ImportMediawiki extends ImportPlugin
*
* @return void
*/
public function doImport(&$sql_data = array())
public function doImport(array &$sql_data = array())
{
global $error, $timeout_passed, $finished;
@ -298,7 +298,7 @@ class ImportMediawiki extends ImportPlugin
*
* @return void
*/
private function _importDataOneTable($table, &$sql_data)
private function _importDataOneTable(array $table, array &$sql_data)
{
$analyze = $this->_getAnalyze();
if ($analyze) {
@ -348,7 +348,7 @@ class ImportMediawiki extends ImportPlugin
*
* @return void
*/
private function _setTableHeaders(&$table_headers, $table_row)
private function _setTableHeaders(array &$table_headers, array $table_row)
{
if (empty($table_headers)) {
// The first table row should contain the number of columns
@ -379,7 +379,7 @@ class ImportMediawiki extends ImportPlugin
*
* @return void
*/
private function _executeImportTables(&$tables, &$analyses, &$sql_data)
private function _executeImportTables(array &$tables, array &$analyses, array &$sql_data)
{
global $db;

View File

@ -100,7 +100,7 @@ class ImportOds extends ImportPlugin
*
* @return void
*/
public function doImport(&$sql_data = array())
public function doImport(array &$sql_data = array())
{
global $db, $error, $timeout_passed, $finished;

View File

@ -60,7 +60,7 @@ class ImportShp extends ImportPlugin
*
* @return void
*/
public function doImport(&$sql_data = array())
public function doImport(array &$sql_data = array())
{
global $db, $error, $finished,
$import_file, $local_import_file, $message;

View File

@ -104,7 +104,7 @@ class ImportSql extends ImportPlugin
*
* @return void
*/
public function doImport(&$sql_data = array())
public function doImport(array &$sql_data = array())
{
global $error, $timeout_passed;
@ -178,7 +178,7 @@ class ImportSql extends ImportPlugin
*
* @return void
*/
private function _setSQLMode($dbi, $request)
private function _setSQLMode($dbi, array $request)
{
$sql_modes = array();
if (isset($request['sql_compatibility'])

View File

@ -58,7 +58,7 @@ class ImportXml extends ImportPlugin
*
* @return void
*/
public function doImport(&$sql_data = array())
public function doImport(array &$sql_data = array())
{
global $error, $timeout_passed, $finished, $db;

View File

@ -276,7 +276,7 @@ class Pdf extends PdfLib
*
* @return void
*/
public function setWidths($w)
public function setWidths(array $w)
{
// column widths
$this->widths = $w;
@ -290,7 +290,7 @@ class Pdf extends PdfLib
*
* @return void
*/
public function row($data, $links)
public function row(array $data, array $links)
{
// line height
$nb = 0;

View File

@ -479,7 +479,7 @@ class PdfRelationSchema extends ExportRelationSchema
*
* @return void
*/
public function dataDictionaryDoc($alltables)
public function dataDictionaryDoc(array $alltables)
{
// TOC
$this->diagram->addpage($this->orientation);

View File

@ -40,7 +40,7 @@ abstract class Bool2TextTransformationsPlugin extends TransformationsPlugin
*
* @return string
*/
public function applyTransformation($buffer, $options = array(), $meta = '')
public function applyTransformation($buffer, array $options = array(), $meta = '')
{
$cfg = $GLOBALS['cfg'];
$options = $this->getOptions($options, $cfg['DefaultTransformations']['Bool2Text']);

View File

@ -25,7 +25,7 @@ abstract class CodeMirrorEditorTransformationPlugin extends IOTransformationsPlu
*
* @return string
*/
public function applyTransformation($buffer, $options = array(), $meta = '')
public function applyTransformation($buffer, array $options = array(), $meta = '')
{
return $buffer;
}
@ -47,10 +47,10 @@ abstract class CodeMirrorEditorTransformationPlugin extends IOTransformationsPlu
* @return string the html for input field
*/
public function getInputHtml(
$column,
array $column,
$row_id,
$column_name_appendix,
$options,
array $options,
$value,
$text_dir,
$tabindex,

View File

@ -48,7 +48,7 @@ abstract class DateFormatTransformationsPlugin extends TransformationsPlugin
*
* @return string
*/
public function applyTransformation($buffer, $options = array(), $meta = '')
public function applyTransformation($buffer, array $options = array(), $meta = '')
{
// possibly use a global transform and feed it with special options
$cfg = $GLOBALS['cfg'];

View File

@ -42,7 +42,7 @@ abstract class DownloadTransformationsPlugin extends TransformationsPlugin
*
* @return string
*/
public function applyTransformation($buffer, $options = array(), $meta = '')
public function applyTransformation($buffer, array $options = array(), $meta = '')
{
global $row, $fields_meta;

View File

@ -47,7 +47,7 @@ abstract class ExternalTransformationsPlugin extends TransformationsPlugin
*
* @return bool
*/
public function applyTransformationNoWrap($options = array())
public function applyTransformationNoWrap(array $options = array())
{
if (!isset($options[3]) || $options[3] == '') {
$nowrap = true;
@ -69,7 +69,7 @@ abstract class ExternalTransformationsPlugin extends TransformationsPlugin
*
* @return string
*/
public function applyTransformation($buffer, $options = array(), $meta = '')
public function applyTransformation($buffer, array $options = array(), $meta = '')
{
// possibly use a global transform and feed it with special options

View File

@ -40,7 +40,7 @@ abstract class FormattedTransformationsPlugin extends TransformationsPlugin
*
* @return string
*/
public function applyTransformation($buffer, $options = array(), $meta = '')
public function applyTransformation($buffer, array $options = array(), $meta = '')
{
return '<iframe srcdoc="'
. strtr($buffer, '"', '\'')

View File

@ -40,7 +40,7 @@ abstract class HexTransformationsPlugin extends TransformationsPlugin
*
* @return string
*/
public function applyTransformation($buffer, $options = array(), $meta = '')
public function applyTransformation($buffer, array $options = array(), $meta = '')
{
// possibly use a global transform and feed it with special options
$cfg = $GLOBALS['cfg'];

Some files were not shown because too many files have changed in this diff Show More