Add missing traversable type hints
Replace array type hint with mixed[] type hint, since it means the same. This way it's possible to require traversable type hint for new code. Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
e0010454bf
commit
6a2c12bdc8
@ -31,10 +31,10 @@ use function vsprintf;
|
||||
*/
|
||||
class Advisor
|
||||
{
|
||||
/** @var array */
|
||||
/** @var mixed[] */
|
||||
private array $variables = [];
|
||||
|
||||
/** @var array */
|
||||
/** @var mixed[] */
|
||||
private array $globals = [];
|
||||
|
||||
/**
|
||||
@ -43,7 +43,7 @@ class Advisor
|
||||
*/
|
||||
private array $rules = [];
|
||||
|
||||
/** @var array{fired:array, notfired:array, unchecked:array, errors:array} */
|
||||
/** @var array{fired:mixed[], notfired:mixed[], unchecked:mixed[], errors:mixed[]} */
|
||||
private array $runResult = ['fired' => [], 'notfired' => [], 'unchecked' => [], 'errors' => []];
|
||||
|
||||
public function __construct(private DatabaseInterface $dbi, private ExpressionLanguage $expression)
|
||||
@ -151,13 +151,13 @@ class Advisor
|
||||
$this->rules = array_merge($genericRules, $extraRules);
|
||||
}
|
||||
|
||||
/** @return array{fired: array, notfired: array, unchecked: array, errors: array} */
|
||||
/** @return array{fired: mixed[], notfired: mixed[], unchecked: mixed[], errors: mixed[]} */
|
||||
public function getRunResult(): array
|
||||
{
|
||||
return $this->runResult;
|
||||
}
|
||||
|
||||
/** @psalm-return array{fired:array, notfired:array, unchecked:array, errors:array} */
|
||||
/** @psalm-return array{fired:mixed[], notfired:mixed[], unchecked:mixed[], errors:mixed[]} */
|
||||
public function run(): array
|
||||
{
|
||||
$this->setVariables();
|
||||
@ -249,8 +249,8 @@ class Advisor
|
||||
/**
|
||||
* Adds a rule to the result list
|
||||
*
|
||||
* @param string $type type of rule
|
||||
* @param array $rule rule itself
|
||||
* @param string $type type of rule
|
||||
* @param mixed[] $rule rule itself
|
||||
* @psalm-param 'notfired'|'fired'|'unchecked'|'errors' $type
|
||||
*/
|
||||
public function addRule(string $type, array $rule): void
|
||||
@ -302,7 +302,7 @@ class Advisor
|
||||
/**
|
||||
* Callback for wrapping links with Core::linkURL
|
||||
*
|
||||
* @param array $matches List of matched elements form preg_replace_callback
|
||||
* @param mixed[] $matches List of matched elements form preg_replace_callback
|
||||
*
|
||||
* @return string Replacement value
|
||||
*/
|
||||
@ -314,7 +314,7 @@ class Advisor
|
||||
/**
|
||||
* Callback for wrapping variable edit links
|
||||
*
|
||||
* @param array $matches List of matched elements form preg_replace_callback
|
||||
* @param mixed[] $matches List of matched elements form preg_replace_callback
|
||||
*
|
||||
* @return string Replacement value
|
||||
*/
|
||||
|
||||
@ -144,7 +144,7 @@ class Bookmark
|
||||
/**
|
||||
* Replace the placeholders in the bookmark query with variables
|
||||
*
|
||||
* @param array $variables
|
||||
* @param mixed[] $variables
|
||||
*
|
||||
* @return string query with variables applied
|
||||
*/
|
||||
@ -175,8 +175,8 @@ class Bookmark
|
||||
/**
|
||||
* Creates a Bookmark object from the parameters
|
||||
*
|
||||
* @param array $bkmFields the properties of the bookmark to add; here, $bkm_fields['bkm_sql_query'] is urlencoded
|
||||
* @param bool $allUsers whether to make the bookmark available for all users
|
||||
* @param mixed[] $bkmFields the properties of the bookmark to add; here, $bkm_fields['bkm_sql_query'] is urlencoded
|
||||
* @param bool $allUsers whether to make the bookmark available for all users
|
||||
*/
|
||||
public static function createBookmark(
|
||||
DatabaseInterface $dbi,
|
||||
@ -200,7 +200,7 @@ class Bookmark
|
||||
return $bookmark;
|
||||
}
|
||||
|
||||
/** @param array $row Resource used to build the bookmark */
|
||||
/** @param mixed[] $row Resource used to build the bookmark */
|
||||
protected static function createFromRow(DatabaseInterface $dbi, array $row): Bookmark
|
||||
{
|
||||
$bookmark = new Bookmark($dbi, new Relation($dbi));
|
||||
|
||||
@ -35,15 +35,15 @@ class BrowseForeigners
|
||||
/**
|
||||
* Function to get html for one relational key
|
||||
*
|
||||
* @param int $horizontalCount the current horizontal count
|
||||
* @param string $header table header
|
||||
* @param array $keys all the keys
|
||||
* @param int $indexByKeyname index by keyname
|
||||
* @param array $descriptions descriptions
|
||||
* @param int $indexByDescription index by description
|
||||
* @param string $currentValue current value on the edit form
|
||||
* @param int $horizontalCount the current horizontal count
|
||||
* @param string $header table header
|
||||
* @param mixed[] $keys all the keys
|
||||
* @param int $indexByKeyname index by keyname
|
||||
* @param mixed[] $descriptions descriptions
|
||||
* @param int $indexByDescription index by description
|
||||
* @param string $currentValue current value on the edit form
|
||||
*
|
||||
* @return array the generated html
|
||||
* @return mixed[] the generated html
|
||||
*/
|
||||
private function getHtmlForOneKey(
|
||||
int $horizontalCount,
|
||||
@ -135,7 +135,7 @@ class BrowseForeigners
|
||||
* @param string $db current database
|
||||
* @param string $table current table
|
||||
* @param string $field field
|
||||
* @param array $foreignData foreign column data
|
||||
* @param mixed[] $foreignData foreign column data
|
||||
* @param string|null $fieldKey field key
|
||||
* @param string $currentValue current columns's value
|
||||
*/
|
||||
@ -262,7 +262,7 @@ class BrowseForeigners
|
||||
/**
|
||||
* Function to get html for the goto page option
|
||||
*
|
||||
* @param array|null $foreignData foreign data
|
||||
* @param mixed[]|null $foreignData foreign data
|
||||
*/
|
||||
private function getHtmlForGotoPage(array|null $foreignData): string
|
||||
{
|
||||
|
||||
@ -67,6 +67,7 @@ class TwigLintCommand extends Command
|
||||
$this->addOption('show-deprecations', null, InputOption::VALUE_NONE, 'Show deprecations as errors');
|
||||
}
|
||||
|
||||
/** @return mixed[] */
|
||||
protected function findFiles(string $baseFolder): array
|
||||
{
|
||||
/* Open the handle */
|
||||
@ -135,6 +136,7 @@ class TwigLintCommand extends Command
|
||||
return $this->display($output, $io, $filesInfo);
|
||||
}
|
||||
|
||||
/** @return mixed[] */
|
||||
protected function getFilesInfo(string $templatesPath): array
|
||||
{
|
||||
$filesInfo = [];
|
||||
@ -154,6 +156,7 @@ class TwigLintCommand extends Command
|
||||
return (string) file_get_contents($filePath);
|
||||
}
|
||||
|
||||
/** @return mixed[] */
|
||||
private function validate(string $template, string $file): array
|
||||
{
|
||||
$twig = Template::getTwigEnvironment(null);
|
||||
@ -180,6 +183,7 @@ class TwigLintCommand extends Command
|
||||
return ['template' => $template, 'file' => $file, 'valid' => true];
|
||||
}
|
||||
|
||||
/** @param mixed[] $filesInfo */
|
||||
private function display(OutputInterface $output, SymfonyStyle $io, array $filesInfo): int
|
||||
{
|
||||
$errors = 0;
|
||||
@ -247,6 +251,7 @@ class TwigLintCommand extends Command
|
||||
}
|
||||
}
|
||||
|
||||
/** @return mixed[] */
|
||||
private function getContext(string $template, int $line, int $context = 3): array
|
||||
{
|
||||
$lines = explode("\n", $template);
|
||||
|
||||
@ -73,13 +73,13 @@ use const PHP_URL_SCHEME;
|
||||
*/
|
||||
class Config
|
||||
{
|
||||
/** @var array default configuration settings */
|
||||
/** @var mixed[] default configuration settings */
|
||||
public array $default = [];
|
||||
|
||||
/** @var array configuration settings, without user preferences applied */
|
||||
/** @var mixed[] configuration settings, without user preferences applied */
|
||||
public array $baseSettings = [];
|
||||
|
||||
/** @var array configuration settings */
|
||||
/** @var mixed[] configuration settings */
|
||||
public array $settings = [];
|
||||
|
||||
/** @var string config source */
|
||||
@ -90,7 +90,7 @@ class Config
|
||||
|
||||
public bool $errorConfigFile = false;
|
||||
|
||||
/** @var array */
|
||||
/** @var mixed[] */
|
||||
public array $defaultServer = [];
|
||||
|
||||
private bool $isHttps;
|
||||
@ -1191,11 +1191,11 @@ class Config
|
||||
/**
|
||||
* Return connection parameters for the database server
|
||||
*
|
||||
* @param int $mode Connection mode.
|
||||
* @param array|null $server Server information like host/port/socket/persistent
|
||||
* @param int $mode Connection mode.
|
||||
* @param mixed[]|null $server Server information like host/port/socket/persistent
|
||||
* @psalm-param ConnectionType $mode
|
||||
*
|
||||
* @return array user, host and server settings array
|
||||
* @return mixed[] user, host and server settings array
|
||||
*/
|
||||
public static function getConnectionParams(int $mode, array|null $server = null): array
|
||||
{
|
||||
|
||||
@ -29,6 +29,8 @@ class ConfigFile
|
||||
* Stores default phpMyAdmin config
|
||||
*
|
||||
* @see Settings
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $defaultCfg;
|
||||
|
||||
@ -41,6 +43,8 @@ class ConfigFile
|
||||
|
||||
/**
|
||||
* Stores original PMA config, not modified by user preferences
|
||||
*
|
||||
* @var mixed[]|null
|
||||
*/
|
||||
private array|null $baseCfg = null;
|
||||
|
||||
@ -52,7 +56,7 @@ class ConfigFile
|
||||
/**
|
||||
* Keys which will be always written to config file
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $persistKeys = [];
|
||||
|
||||
@ -60,7 +64,7 @@ class ConfigFile
|
||||
* Changes keys while updating config in {@link updateWithGlobalConfig()}
|
||||
* or reading by {@link getConfig()} or {@link getConfigArray()}
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $cfgUpdateReadMapping = [];
|
||||
|
||||
@ -76,7 +80,7 @@ class ConfigFile
|
||||
private string $id;
|
||||
|
||||
/**
|
||||
* @param array|null $baseConfig base configuration read from
|
||||
* @param mixed[]|null $baseConfig base configuration read from
|
||||
* {@link PhpMyAdmin\Config::$base_config},
|
||||
* use only when not in PMA Setup
|
||||
*/
|
||||
@ -103,7 +107,7 @@ class ConfigFile
|
||||
* Sets names of config options which will be placed in config file even if
|
||||
* they are set to their default values (use only full paths)
|
||||
*
|
||||
* @param array $keys the names of the config options
|
||||
* @param mixed[] $keys the names of the config options
|
||||
*/
|
||||
public function setPersistKeys(array $keys): void
|
||||
{
|
||||
@ -115,7 +119,7 @@ class ConfigFile
|
||||
/**
|
||||
* Returns flipped array set by {@link setPersistKeys()}
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getPersistKeysMap(): array
|
||||
{
|
||||
@ -126,7 +130,7 @@ class ConfigFile
|
||||
* By default ConfigFile allows setting of all configuration keys, use
|
||||
* this method to set up a filter on {@link set()} method
|
||||
*
|
||||
* @param array|null $keys array of allowed keys or null to remove filter
|
||||
* @param mixed[]|null $keys array of allowed keys or null to remove filter
|
||||
*/
|
||||
public function setAllowedKeys(array|null $keys): void
|
||||
{
|
||||
@ -146,7 +150,7 @@ class ConfigFile
|
||||
* {@link updateWithGlobalConfig()} or reading
|
||||
* by {@link getConfig()} or {@link getConfigArray()}
|
||||
*
|
||||
* @param array $mapping Contains the mapping of "Server/config options"
|
||||
* @param mixed[] $mapping Contains the mapping of "Server/config options"
|
||||
* to "Server/1/config options"
|
||||
*/
|
||||
public function setCfgUpdateReadMapping(array $mapping): void
|
||||
@ -165,7 +169,7 @@ class ConfigFile
|
||||
/**
|
||||
* Sets configuration data (overrides old data)
|
||||
*
|
||||
* @param array $cfg Configuration options
|
||||
* @param mixed[] $cfg Configuration options
|
||||
*/
|
||||
public function setConfigData(array $cfg): void
|
||||
{
|
||||
@ -222,8 +226,10 @@ class ConfigFile
|
||||
* Flattens multidimensional array, changes indices to paths
|
||||
* (eg. 'key/subkey').
|
||||
*
|
||||
* @param array $array Multidimensional array
|
||||
* @param string $prefix Prefix
|
||||
* @param mixed[] $array Multidimensional array
|
||||
* @param string $prefix Prefix
|
||||
*
|
||||
* @return mixed[]
|
||||
*/
|
||||
private function getFlatArray(array $array, string $prefix = ''): array
|
||||
{
|
||||
@ -241,6 +247,8 @@ class ConfigFile
|
||||
|
||||
/**
|
||||
* Returns default config in a flattened array
|
||||
*
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getFlatDefaultConfig(): array
|
||||
{
|
||||
@ -251,7 +259,7 @@ class ConfigFile
|
||||
* Updates config with values read from given array
|
||||
* (config will contain differences to defaults from {@see \PhpMyAdmin\Config\Settings}).
|
||||
*
|
||||
* @param array $cfg Configuration
|
||||
* @param mixed[] $cfg Configuration
|
||||
*/
|
||||
public function updateWithGlobalConfig(array $cfg): void
|
||||
{
|
||||
@ -346,7 +354,7 @@ class ConfigFile
|
||||
/**
|
||||
* Returns server list
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getServers(): array
|
||||
{
|
||||
@ -438,7 +446,7 @@ class ConfigFile
|
||||
/**
|
||||
* Returns configuration array (full, multidimensional format)
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getConfig(): array
|
||||
{
|
||||
@ -459,7 +467,7 @@ class ConfigFile
|
||||
/**
|
||||
* Returns configuration array (flat format)
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getConfigArray(): array
|
||||
{
|
||||
|
||||
@ -44,21 +44,21 @@ class Form
|
||||
/**
|
||||
* Form fields (paths), filled by {@link readFormPaths()}, indexed by field name
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
public array $fields;
|
||||
|
||||
/**
|
||||
* Stores default values for some fields (eg. pmadb tables)
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
public array $default;
|
||||
|
||||
/**
|
||||
* Caches field types, indexed by field names
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $fieldsTypes;
|
||||
|
||||
@ -76,7 +76,7 @@ class Form
|
||||
* Reads default config values
|
||||
*
|
||||
* @param string $formName Form name
|
||||
* @param array $form Form data
|
||||
* @param mixed[] $form Form data
|
||||
* @param ConfigFile $cf Config file instance
|
||||
* @param int|null $index arbitrary index, stored in Form::$index
|
||||
*/
|
||||
@ -116,7 +116,7 @@ class Form
|
||||
*
|
||||
* @param string $optionPath Option path
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getOptionValueList(string $optionPath): array
|
||||
{
|
||||
@ -210,7 +210,7 @@ class Form
|
||||
/**
|
||||
* Reads form paths to {@link $fields}
|
||||
*
|
||||
* @param array $form Form
|
||||
* @param mixed[] $form Form
|
||||
*/
|
||||
protected function readFormPaths(array $form): void
|
||||
{
|
||||
@ -265,9 +265,9 @@ class Form
|
||||
*
|
||||
* @see issue #15836
|
||||
*
|
||||
* @param array $form The form data
|
||||
* @param mixed[] $form The form data
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
protected function cleanGroupPaths(array $form): array
|
||||
{
|
||||
@ -290,8 +290,8 @@ class Form
|
||||
* Reads form settings and prepares class to work with given subset of
|
||||
* config file
|
||||
*
|
||||
* @param string $formName Form name
|
||||
* @param array $form Form
|
||||
* @param string $formName Form name
|
||||
* @param mixed[] $form Form
|
||||
*/
|
||||
public function loadForm(string $formName, array $form): void
|
||||
{
|
||||
|
||||
@ -63,14 +63,14 @@ class FormDisplay
|
||||
* [ Form_name ] is an array of form errors
|
||||
* [path] is a string storing error associated with single field
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $errors = [];
|
||||
|
||||
/**
|
||||
* Paths changed so that they can be used as HTML ids, indexed by paths
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $translatedPaths = [];
|
||||
|
||||
@ -78,7 +78,7 @@ class FormDisplay
|
||||
* Server paths change indexes so we define maps from current server
|
||||
* path to the first one, indexed by work path
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $systemPaths = [];
|
||||
|
||||
@ -95,7 +95,7 @@ class FormDisplay
|
||||
/**
|
||||
* Dictionary with disallowed user preferences keys
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $userprefsDisallow = [];
|
||||
|
||||
@ -125,7 +125,7 @@ class FormDisplay
|
||||
* Registers form in form manager
|
||||
*
|
||||
* @param string $formName Form name
|
||||
* @param array $form Form data
|
||||
* @param mixed[] $form Form data
|
||||
* @param int|null $serverId 0 if new server, validation; >= 1 if editing a server
|
||||
*/
|
||||
public function registerForm(string $formName, array $form, int|null $serverId = null): void
|
||||
@ -207,10 +207,10 @@ class FormDisplay
|
||||
/**
|
||||
* Outputs HTML for forms
|
||||
*
|
||||
* @param bool $showButtons whether show submit and reset button
|
||||
* @param string|null $formAction action attribute for the form
|
||||
* @param array|null $hiddenFields array of form hidden fields (key: field
|
||||
* name)
|
||||
* @param bool $showButtons whether show submit and reset button
|
||||
* @param string|null $formAction action attribute for the form
|
||||
* @param mixed[]|null $hiddenFields array of form hidden fields (key: field
|
||||
* name)
|
||||
*
|
||||
* @return string HTML for forms
|
||||
*/
|
||||
@ -318,8 +318,8 @@ class FormDisplay
|
||||
* @param bool|null $userPrefsAllow whether user preferences are enabled
|
||||
* for this field (null - no support,
|
||||
* true/false - enabled/disabled)
|
||||
* @param array $jsDefault array which stores JavaScript code
|
||||
* to be displayed
|
||||
* @param mixed[] $jsDefault array which stores JavaScript code
|
||||
* to be displayed
|
||||
*
|
||||
* @return string|null HTML for input field
|
||||
*/
|
||||
@ -512,7 +512,7 @@ class FormDisplay
|
||||
* Validates select field and casts $value to correct type
|
||||
*
|
||||
* @param string|bool $value Current value
|
||||
* @param array $allowed List of allowed values
|
||||
* @param mixed[] $allowed List of allowed values
|
||||
*/
|
||||
private function validateSelect(string|bool &$value, array $allowed): bool
|
||||
{
|
||||
@ -761,8 +761,8 @@ class FormDisplay
|
||||
/**
|
||||
* Sets field comments and warnings based on current environment
|
||||
*
|
||||
* @param string $systemPath Path to settings
|
||||
* @param array $opts Chosen options
|
||||
* @param string $systemPath Path to settings
|
||||
* @param mixed[] $opts Chosen options
|
||||
*/
|
||||
private function setComments(string $systemPath, array &$opts): void
|
||||
{
|
||||
@ -839,8 +839,8 @@ class FormDisplay
|
||||
/**
|
||||
* Copy items of an array to $_POST variable
|
||||
*
|
||||
* @param array $postValues List of parameters
|
||||
* @param string $key Array key
|
||||
* @param mixed[] $postValues List of parameters
|
||||
* @param string $key Array key
|
||||
*/
|
||||
private function fillPostArrayParameters(array $postValues, string $key): void
|
||||
{
|
||||
|
||||
@ -47,13 +47,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 $valueIsDefault whether value is default
|
||||
* @param array|null $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 $valueIsDefault whether value is default
|
||||
* @param mixed[]|null $opts see above description
|
||||
*/
|
||||
public function displayInput(
|
||||
string $path,
|
||||
@ -127,9 +127,9 @@ class FormDisplayTemplate
|
||||
/**
|
||||
* Appends JS validation code to $js_array
|
||||
*
|
||||
* @param string $fieldId ID of field to validate
|
||||
* @param string|array $validators validators callback
|
||||
* @param array $jsArray will be updated with javascript code
|
||||
* @param string $fieldId ID of field to validate
|
||||
* @param string|mixed[] $validators validators callback
|
||||
* @param mixed[] $jsArray will be updated with javascript code
|
||||
*/
|
||||
public function addJsValidate(string $fieldId, string|array $validators, array &$jsArray): void
|
||||
{
|
||||
@ -145,8 +145,8 @@ class FormDisplayTemplate
|
||||
/**
|
||||
* Displays error list
|
||||
*
|
||||
* @param string $name Name of item with errors
|
||||
* @param array $errorList List of errors to show
|
||||
* @param string $name Name of item with errors
|
||||
* @param mixed[] $errorList List of errors to show
|
||||
*
|
||||
* @return string HTML for errors
|
||||
*/
|
||||
@ -155,6 +155,7 @@ class FormDisplayTemplate
|
||||
return $this->template->render('config/form_display/errors', ['name' => $name, 'error_list' => $errorList]);
|
||||
}
|
||||
|
||||
/** @param mixed[] $data */
|
||||
public function display(array $data): string
|
||||
{
|
||||
return $this->template->render('config/form_display/display', $data);
|
||||
|
||||
@ -47,7 +47,7 @@ abstract class BaseForm extends FormDisplay
|
||||
* End group blocks with:
|
||||
* ':group:end'
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*
|
||||
* @todo This should be abstract, but that does not work in PHP 5
|
||||
*/
|
||||
|
||||
@ -12,7 +12,7 @@ use PhpMyAdmin\Config\Forms\User\MainForm;
|
||||
|
||||
class BrowseForm extends BaseForm
|
||||
{
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getForms(): array
|
||||
{
|
||||
return ['Browse' => MainForm::getForms()['Browse']];
|
||||
|
||||
@ -12,7 +12,7 @@ use PhpMyAdmin\Config\Forms\User\MainForm;
|
||||
|
||||
class DbStructureForm extends BaseForm
|
||||
{
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getForms(): array
|
||||
{
|
||||
return ['DbStructure' => MainForm::getForms()['DbStructure']];
|
||||
|
||||
@ -13,7 +13,7 @@ use PhpMyAdmin\Config\Forms\User\MainForm;
|
||||
|
||||
class EditForm extends BaseForm
|
||||
{
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getForms(): array
|
||||
{
|
||||
return ['Edit' => MainForm::getForms()['Edit'], 'Text_fields' => FeaturesForm::getForms()['Text_fields']];
|
||||
|
||||
@ -12,7 +12,7 @@ use PhpMyAdmin\Config\Forms\User\MainForm;
|
||||
|
||||
class TableStructureForm extends BaseForm
|
||||
{
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getForms(): array
|
||||
{
|
||||
return ['TableStructure' => MainForm::getForms()['TableStructure']];
|
||||
|
||||
@ -11,7 +11,7 @@ use PhpMyAdmin\Config\Forms\BaseForm;
|
||||
|
||||
class ConfigForm extends BaseForm
|
||||
{
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getForms(): array
|
||||
{
|
||||
return ['Config' => ['DefaultLang', 'ServerDefault']];
|
||||
|
||||
@ -11,7 +11,7 @@ use function array_diff;
|
||||
|
||||
class FeaturesForm extends \PhpMyAdmin\Config\Forms\User\FeaturesForm
|
||||
{
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getForms(): array
|
||||
{
|
||||
// phpcs:disable Squiz.Arrays.ArrayDeclaration.KeySpecified,Squiz.Arrays.ArrayDeclaration.NoKeySpecified
|
||||
|
||||
@ -9,7 +9,7 @@ namespace PhpMyAdmin\Config\Forms\Setup;
|
||||
|
||||
class MainForm extends \PhpMyAdmin\Config\Forms\User\MainForm
|
||||
{
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getForms(): array
|
||||
{
|
||||
$result = parent::getForms();
|
||||
|
||||
@ -13,7 +13,7 @@ use function __;
|
||||
|
||||
class ServersForm extends BaseForm
|
||||
{
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getForms(): array
|
||||
{
|
||||
// phpcs:disable Squiz.Arrays.ArrayDeclaration.KeySpecified,Squiz.Arrays.ArrayDeclaration.NoKeySpecified
|
||||
|
||||
@ -9,7 +9,7 @@ namespace PhpMyAdmin\Config\Forms\Setup;
|
||||
|
||||
class SqlForm extends \PhpMyAdmin\Config\Forms\User\SqlForm
|
||||
{
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getForms(): array
|
||||
{
|
||||
$result = parent::getForms();
|
||||
|
||||
@ -13,7 +13,7 @@ use function __;
|
||||
|
||||
class ExportForm extends BaseForm
|
||||
{
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getForms(): array
|
||||
{
|
||||
// phpcs:disable Squiz.Arrays.ArrayDeclaration.KeySpecified,Squiz.Arrays.ArrayDeclaration.NoKeySpecified
|
||||
|
||||
@ -13,7 +13,7 @@ use function __;
|
||||
|
||||
class FeaturesForm extends BaseForm
|
||||
{
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getForms(): array
|
||||
{
|
||||
$result = [
|
||||
|
||||
@ -13,7 +13,7 @@ use function __;
|
||||
|
||||
class ImportForm extends BaseForm
|
||||
{
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getForms(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@ -13,7 +13,7 @@ use function __;
|
||||
|
||||
class MainForm extends BaseForm
|
||||
{
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getForms(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@ -13,7 +13,7 @@ use function __;
|
||||
|
||||
class NaviForm extends BaseForm
|
||||
{
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getForms(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@ -13,7 +13,7 @@ use function __;
|
||||
|
||||
class SqlForm extends BaseForm
|
||||
{
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getForms(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@ -60,7 +60,7 @@ class Validator
|
||||
*
|
||||
* @param ConfigFile $cf Config file instance
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public static function getValidators(ConfigFile $cf): array
|
||||
{
|
||||
@ -116,11 +116,11 @@ class Validator
|
||||
* cleanup in HTML document
|
||||
* o false - when no validators match name(s) given by $validator_id
|
||||
*
|
||||
* @param ConfigFile $cf Config file instance
|
||||
* @param string|array $validatorId ID of validator(s) to run
|
||||
* @param array $values Values to validate
|
||||
* @param bool $isPostSource tells whether $values are directly from
|
||||
* POST request
|
||||
* @param ConfigFile $cf Config file instance
|
||||
* @param string|mixed[] $validatorId ID of validator(s) to run
|
||||
* @param mixed[] $values Values to validate
|
||||
* @param bool $isPostSource tells whether $values are directly from
|
||||
* POST request
|
||||
*/
|
||||
public static function validate(
|
||||
ConfigFile $cf,
|
||||
@ -255,12 +255,12 @@ class Validator
|
||||
/**
|
||||
* Validate server config
|
||||
*
|
||||
* @param string $path path to config, not used
|
||||
* keep this parameter since the method is invoked using
|
||||
* reflection along with other similar methods
|
||||
* @param array $values config values
|
||||
* @param string $path path to config, not used
|
||||
* keep this parameter since the method is invoked using
|
||||
* reflection along with other similar methods
|
||||
* @param mixed[] $values config values
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public static function validateServer(string $path, array $values): array
|
||||
{
|
||||
@ -322,12 +322,12 @@ class Validator
|
||||
/**
|
||||
* Validate pmadb config
|
||||
*
|
||||
* @param string $path path to config, not used
|
||||
* keep this parameter since the method is invoked using
|
||||
* reflection along with other similar methods
|
||||
* @param array $values config values
|
||||
* @param string $path path to config, not used
|
||||
* keep this parameter since the method is invoked using
|
||||
* reflection along with other similar methods
|
||||
* @param mixed[] $values config values
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public static function validatePMAStorage(string $path, array $values): array
|
||||
{
|
||||
@ -377,10 +377,10 @@ class Validator
|
||||
/**
|
||||
* Validates regular expression
|
||||
*
|
||||
* @param string $path path to config
|
||||
* @param array $values config values
|
||||
* @param string $path path to config
|
||||
* @param mixed[] $values config values
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public static function validateRegex(string $path, array $values): array
|
||||
{
|
||||
@ -411,10 +411,10 @@ class Validator
|
||||
/**
|
||||
* Validates TrustedProxies field
|
||||
*
|
||||
* @param string $path path to config
|
||||
* @param array $values config values
|
||||
* @param string $path path to config
|
||||
* @param mixed[] $values config values
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public static function validateTrustedProxies(string $path, array $values): array
|
||||
{
|
||||
@ -465,12 +465,12 @@ class Validator
|
||||
/**
|
||||
* Tests integer value
|
||||
*
|
||||
* @param string $path path to config
|
||||
* @param array $values config values
|
||||
* @param bool $allowNegative allow negative values
|
||||
* @param bool $allowZero allow zero
|
||||
* @param int $maxValue max allowed value
|
||||
* @param string $errorString error message string
|
||||
* @param string $path path to config
|
||||
* @param mixed[] $values config values
|
||||
* @param bool $allowNegative allow negative values
|
||||
* @param bool $allowZero allow zero
|
||||
* @param int $maxValue max allowed value
|
||||
* @param string $errorString error message string
|
||||
*
|
||||
* @return string empty string if test is successful
|
||||
*/
|
||||
@ -503,10 +503,10 @@ class Validator
|
||||
/**
|
||||
* Validates port number
|
||||
*
|
||||
* @param string $path path to config
|
||||
* @param array $values config values
|
||||
* @param string $path path to config
|
||||
* @param mixed[] $values config values
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public static function validatePortNumber(string $path, array $values): array
|
||||
{
|
||||
@ -525,10 +525,10 @@ class Validator
|
||||
/**
|
||||
* Validates positive number
|
||||
*
|
||||
* @param string $path path to config
|
||||
* @param array $values config values
|
||||
* @param string $path path to config
|
||||
* @param mixed[] $values config values
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public static function validatePositiveNumber(string $path, array $values): array
|
||||
{
|
||||
@ -547,10 +547,10 @@ class Validator
|
||||
/**
|
||||
* Validates non-negative number
|
||||
*
|
||||
* @param string $path path to config
|
||||
* @param array $values config values
|
||||
* @param string $path path to config
|
||||
* @param mixed[] $values config values
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public static function validateNonNegativeNumber(string $path, array $values): array
|
||||
{
|
||||
@ -570,9 +570,9 @@ class Validator
|
||||
* Validates value according to given regular expression
|
||||
* Pattern and modifiers must be a valid for PCRE <b>and</b> JavaScript RegExp
|
||||
*
|
||||
* @param string $path path to config
|
||||
* @param array $values config values
|
||||
* @param string $regex regular expression to match
|
||||
* @param string $path path to config
|
||||
* @param mixed[] $values config values
|
||||
* @param string $regex regular expression to match
|
||||
*/
|
||||
public static function validateByRegex(string $path, array $values, string $regex): array|string
|
||||
{
|
||||
@ -588,11 +588,11 @@ class Validator
|
||||
/**
|
||||
* Validates upper bound for numeric inputs
|
||||
*
|
||||
* @param string $path path to config
|
||||
* @param array $values config values
|
||||
* @param int $maxValue maximal allowed value
|
||||
* @param string $path path to config
|
||||
* @param mixed[] $values config values
|
||||
* @param int $maxValue maximal allowed value
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public static function validateUpperBound(string $path, array $values, int $maxValue): array
|
||||
{
|
||||
|
||||
@ -397,7 +397,7 @@ class Relation
|
||||
* @param string $column the name of the column to check for
|
||||
* @param string $source the source for foreign key information
|
||||
*
|
||||
* @return array db,table,column
|
||||
* @return mixed[] db,table,column
|
||||
*/
|
||||
public function getForeigners(string $db, string $table, string $column = '', string $source = 'both'): array
|
||||
{
|
||||
@ -521,7 +521,7 @@ class Relation
|
||||
* @param string $db the name of the db to check for
|
||||
* @param string $table the name of the table to check for
|
||||
*
|
||||
* @return array [column_name] = comment
|
||||
* @return mixed[] [column_name] = comment
|
||||
*/
|
||||
public function getComments(string $db, string $table = ''): array
|
||||
{
|
||||
@ -575,7 +575,7 @@ class Relation
|
||||
/**
|
||||
* Gets the comment for a db
|
||||
*
|
||||
* @return array comments
|
||||
* @return mixed[] comments
|
||||
*/
|
||||
public function getDbComments(): array
|
||||
{
|
||||
@ -693,7 +693,7 @@ class Relation
|
||||
*
|
||||
* @param string $username the username
|
||||
*
|
||||
* @return array|bool list of history items
|
||||
* @return mixed[]|bool list of history items
|
||||
*/
|
||||
public function getHistory(string $username): array|bool
|
||||
{
|
||||
@ -769,9 +769,9 @@ class Relation
|
||||
/**
|
||||
* Prepares the dropdown for one mode
|
||||
*
|
||||
* @param array $foreign the keys and values for foreigns
|
||||
* @param string $data the current data of the dropdown
|
||||
* @param string $mode the needed mode
|
||||
* @param mixed[] $foreign the keys and values for foreigns
|
||||
* @param string $data the current data of the dropdown
|
||||
* @param string $mode the needed mode
|
||||
*
|
||||
* @return string[] the <option value=""><option>s
|
||||
*/
|
||||
@ -859,11 +859,11 @@ class Relation
|
||||
/**
|
||||
* Outputs dropdown with values of foreign fields
|
||||
*
|
||||
* @param array[] $dispRow array of the displayed row
|
||||
* @param string $foreignField the foreign field
|
||||
* @param string $foreignDisplay the foreign field to display
|
||||
* @param string $data the current data of the dropdown (field in row)
|
||||
* @param int|null $max maximum number of items in the dropdown
|
||||
* @param mixed[][] $dispRow array of the displayed row
|
||||
* @param string $foreignField the foreign field
|
||||
* @param string $foreignDisplay the foreign field to display
|
||||
* @param string $data the current data of the dropdown (field in row)
|
||||
* @param int|null $max maximum number of items in the dropdown
|
||||
*
|
||||
* @return string the <option value=""><option>s
|
||||
*/
|
||||
@ -955,14 +955,14 @@ class Relation
|
||||
/**
|
||||
* Gets foreign keys in preparation for a drop-down selector
|
||||
*
|
||||
* @param array|bool $foreigners array of the foreign keys
|
||||
* @param string $field the foreign field name
|
||||
* @param bool $overrideTotal whether to override the total
|
||||
* @param string $foreignFilter a possible filter
|
||||
* @param string $foreignLimit a possible LIMIT clause
|
||||
* @param bool $getTotal optional, whether to get total num of rows
|
||||
* in $foreignData['the_total;]
|
||||
* (has an effect of performance)
|
||||
* @param mixed[]|bool $foreigners array of the foreign keys
|
||||
* @param string $field the foreign field name
|
||||
* @param bool $overrideTotal whether to override the total
|
||||
* @param string $foreignFilter a possible filter
|
||||
* @param string $foreignLimit a possible LIMIT clause
|
||||
* @param bool $getTotal optional, whether to get total num of rows
|
||||
* in $foreignData['the_total;]
|
||||
* (has an effect of performance)
|
||||
*
|
||||
* @return array<string, mixed> data about the foreign keys
|
||||
* @psalm-return array{
|
||||
@ -1328,6 +1328,8 @@ class Relation
|
||||
* @param string $db name of master table db.
|
||||
* @param string $table name of master table.
|
||||
* @param string $column name of master table column.
|
||||
*
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getChildReferences(string $db, string $table, string $column = ''): array
|
||||
{
|
||||
@ -1356,11 +1358,11 @@ class Relation
|
||||
/**
|
||||
* Check child table references and foreign key for a table column.
|
||||
*
|
||||
* @param string $db name of master table db.
|
||||
* @param string $table name of master table.
|
||||
* @param string $column name of master table column.
|
||||
* @param array|null $foreignersFull foreigners array for the whole table.
|
||||
* @param array|null $childReferencesFull child references for the whole table.
|
||||
* @param string $db name of master table db.
|
||||
* @param string $table name of master table.
|
||||
* @param string $column name of master table column.
|
||||
* @param mixed[]|null $foreignersFull foreigners array for the whole table.
|
||||
* @param mixed[]|null $childReferencesFull child references for the whole table.
|
||||
*
|
||||
* @return array<string, mixed> telling about references if foreign key.
|
||||
* @psalm-return array{isEditable: bool, isForeignKey: bool, isReferenced: bool, references: string[]}
|
||||
@ -1419,8 +1421,8 @@ class Relation
|
||||
/**
|
||||
* Search a table column in foreign data.
|
||||
*
|
||||
* @param array $foreigners Table Foreign data
|
||||
* @param string $column Column name
|
||||
* @param mixed[] $foreigners Table Foreign data
|
||||
* @param string $column Column name
|
||||
*/
|
||||
public function searchColumnInForeigners(array $foreigners, string $column): array|false
|
||||
{
|
||||
@ -1453,6 +1455,8 @@ class Relation
|
||||
/**
|
||||
* Returns default PMA table names and their create queries.
|
||||
*
|
||||
* @param mixed[] $tableNameReplacements
|
||||
*
|
||||
* @return array<string, string> table name, create query
|
||||
*/
|
||||
public function getDefaultPmaTableNames(array $tableNameReplacements): array
|
||||
@ -1649,7 +1653,7 @@ class Relation
|
||||
* @param string $db database name
|
||||
* @param string $table table name
|
||||
*
|
||||
* @return array ($res_rel, $have_rel)
|
||||
* @return mixed[] ($res_rel, $have_rel)
|
||||
* @psalm-return array{array, bool}
|
||||
*/
|
||||
public function getRelationsAndStatus(bool $condition, string $db, string $table): array
|
||||
@ -1699,7 +1703,7 @@ class Relation
|
||||
* @param string $foreignDb Database name
|
||||
* @param string $tblStorageEngine Table storage engine
|
||||
*
|
||||
* @return array Table names
|
||||
* @return mixed[] Table names
|
||||
*/
|
||||
public function getTables(string $foreignDb, string $tblStorageEngine): array
|
||||
{
|
||||
|
||||
@ -133,8 +133,8 @@ class UserGroups
|
||||
* Returns the list of allowed menu tab names
|
||||
* based on a data row from usergroup table.
|
||||
*
|
||||
* @param array $row row of usergroup table
|
||||
* @param string $level 'server', 'db' or 'table'
|
||||
* @param mixed[] $row row of usergroup table
|
||||
* @param string $level 'server', 'db' or 'table'
|
||||
*
|
||||
* @return string comma separated list of allowed menu tab names
|
||||
*/
|
||||
@ -256,9 +256,9 @@ class UserGroups
|
||||
* Returns HTML for checkbox groups to choose
|
||||
* tabs of 'server', 'db' or 'table' levels.
|
||||
*
|
||||
* @param string $title title of the checkbox group
|
||||
* @param string $level 'server', 'db' or 'table'
|
||||
* @param array $selected array of selected allowed tabs
|
||||
* @param string $title title of the checkbox group
|
||||
* @param string $level 'server', 'db' or 'table'
|
||||
* @param mixed[] $selected array of selected allowed tabs
|
||||
*
|
||||
* @return string HTML for checkbox groups
|
||||
*/
|
||||
|
||||
@ -148,7 +148,7 @@ class CentralColumnsController extends AbstractController
|
||||
$GLOBALS['message'] = $tmpMsg;
|
||||
}
|
||||
|
||||
/** @param array $params Request parameters */
|
||||
/** @param mixed[] $params Request parameters */
|
||||
public function main(array $params): void
|
||||
{
|
||||
$GLOBALS['text_dir'] ??= null;
|
||||
@ -175,9 +175,9 @@ class CentralColumnsController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params Request parameters
|
||||
* @param mixed[] $params Request parameters
|
||||
*
|
||||
* @return array JSON
|
||||
* @return mixed[] JSON
|
||||
*/
|
||||
public function getColumnList(array $params): array
|
||||
{
|
||||
@ -185,7 +185,7 @@ class CentralColumnsController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params Request parameters
|
||||
* @param mixed[] $params Request parameters
|
||||
*
|
||||
* @return true|Message
|
||||
*/
|
||||
@ -211,7 +211,7 @@ class CentralColumnsController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params Request parameters
|
||||
* @param mixed[] $params Request parameters
|
||||
*
|
||||
* @return true|Message
|
||||
*/
|
||||
@ -237,7 +237,7 @@ class CentralColumnsController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params Request parameters
|
||||
* @param mixed[] $params Request parameters
|
||||
*
|
||||
* @return true|Message
|
||||
*/
|
||||
@ -250,7 +250,7 @@ class CentralColumnsController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
/** @param array $params Request parameters */
|
||||
/** @param mixed[] $params Request parameters */
|
||||
public function editPage(array $params): void
|
||||
{
|
||||
$rows = $this->centralColumns->getHtmlForEditingPage($params['selected_fld'], $params['db']);
|
||||
@ -259,7 +259,7 @@ class CentralColumnsController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params Request parameters
|
||||
* @param mixed[] $params Request parameters
|
||||
*
|
||||
* @return true|Message
|
||||
*/
|
||||
@ -269,7 +269,7 @@ class CentralColumnsController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params Request parameters
|
||||
* @param mixed[] $params Request parameters
|
||||
*
|
||||
* @return true|Message
|
||||
*/
|
||||
|
||||
@ -134,9 +134,9 @@ final class FavoriteTableController extends AbstractController
|
||||
*
|
||||
* @param RecentFavoriteTable $favoriteInstance Instance of this class
|
||||
* @param string $user The user hash
|
||||
* @param array $favoriteTables Existing favorites
|
||||
* @param mixed[] $favoriteTables Existing favorites
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
private function synchronizeFavoriteTables(
|
||||
RecentFavoriteTable $favoriteInstance,
|
||||
|
||||
@ -62,7 +62,7 @@ class StructureController extends AbstractController
|
||||
/** @var int Number of tables */
|
||||
protected int $totalNumTables = 0;
|
||||
|
||||
/** @var array Tables in the database */
|
||||
/** @var mixed[] Tables in the database */
|
||||
protected array $tables = [];
|
||||
|
||||
/** @var bool whether stats show or not */
|
||||
@ -191,7 +191,7 @@ class StructureController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
/** @param array $replicaInfo */
|
||||
/** @param mixed[] $replicaInfo */
|
||||
protected function displayTableList(array $replicaInfo): string
|
||||
{
|
||||
$html = '';
|
||||
@ -509,10 +509,10 @@ class StructureController extends AbstractController
|
||||
/**
|
||||
* Returns whether the row count is approximated
|
||||
*
|
||||
* @param array $currentTable array containing details about the table
|
||||
* @param bool $tableIsView whether the table is a view
|
||||
* @param mixed[] $currentTable array containing details about the table
|
||||
* @param bool $tableIsView whether the table is a view
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
protected function isRowCountApproximated(
|
||||
array $currentTable,
|
||||
@ -554,10 +554,10 @@ class StructureController extends AbstractController
|
||||
/**
|
||||
* Returns the replication status of the table.
|
||||
*
|
||||
* @param array $replicaInfo
|
||||
* @param string $table table name
|
||||
* @param mixed[] $replicaInfo
|
||||
* @param string $table table name
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
protected function getReplicationStatus(array $replicaInfo, string $table): array
|
||||
{
|
||||
@ -605,8 +605,8 @@ class StructureController extends AbstractController
|
||||
/**
|
||||
* Find table with truename
|
||||
*
|
||||
* @param array $db DB to look into
|
||||
* @param string $truename Table name
|
||||
* @param mixed[] $db DB to look into
|
||||
* @param string $truename Table name
|
||||
*/
|
||||
protected function hasTable(array $db, string $truename): bool
|
||||
{
|
||||
@ -631,11 +631,11 @@ class StructureController extends AbstractController
|
||||
*
|
||||
* @internal param bool $table_is_view whether table is view or not
|
||||
*
|
||||
* @param array $currentTable current table
|
||||
* @param int $sumSize total table size
|
||||
* @param int $overheadSize overhead size
|
||||
* @param mixed[] $currentTable current table
|
||||
* @param int $sumSize total table size
|
||||
* @param int $overheadSize overhead size
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
protected function getStuffForEngineTypeTable(
|
||||
array $currentTable,
|
||||
@ -747,15 +747,15 @@ class StructureController extends AbstractController
|
||||
/**
|
||||
* Get values for ARIA/MARIA tables
|
||||
*
|
||||
* @param array $currentTable current table
|
||||
* @param int $sumSize sum size
|
||||
* @param int $overheadSize overhead size
|
||||
* @param string $formattedSize formatted size
|
||||
* @param string $unit unit
|
||||
* @param string $formattedOverhead overhead formatted
|
||||
* @param string $overheadUnit overhead unit
|
||||
* @param mixed[] $currentTable current table
|
||||
* @param int $sumSize sum size
|
||||
* @param int $overheadSize overhead size
|
||||
* @param string $formattedSize formatted size
|
||||
* @param string $unit unit
|
||||
* @param string $formattedOverhead overhead formatted
|
||||
* @param string $overheadUnit overhead unit
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
protected function getValuesForAriaTable(
|
||||
array $currentTable,
|
||||
@ -790,10 +790,10 @@ class StructureController extends AbstractController
|
||||
/**
|
||||
* Get values for InnoDB table
|
||||
*
|
||||
* @param array $currentTable current table
|
||||
* @param int $sumSize sum size
|
||||
* @param mixed[] $currentTable current table
|
||||
* @param int $sumSize sum size
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
protected function getValuesForInnodbTable(
|
||||
array $currentTable,
|
||||
@ -828,10 +828,10 @@ class StructureController extends AbstractController
|
||||
/**
|
||||
* Get values for Mroonga table
|
||||
*
|
||||
* @param array $currentTable current table
|
||||
* @param int $sumSize sum size
|
||||
* @param mixed[] $currentTable current table
|
||||
* @param int $sumSize sum size
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
protected function getValuesForMroongaTable(
|
||||
array $currentTable,
|
||||
|
||||
@ -23,6 +23,8 @@ class BinlogController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* binary log files
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected array $binaryLogs;
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ use function str_contains;
|
||||
*/
|
||||
class DatabasesController extends AbstractController
|
||||
{
|
||||
/** @var array array of database details */
|
||||
/** @var mixed[] array of database details */
|
||||
private array $databases = [];
|
||||
|
||||
/** @var int number of databases */
|
||||
@ -194,10 +194,10 @@ class DatabasesController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $primaryInfo
|
||||
* @param array $replicaInfo
|
||||
* @param mixed[] $primaryInfo
|
||||
* @param mixed[] $replicaInfo
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
private function getDatabases(array $primaryInfo, array $replicaInfo): array
|
||||
{
|
||||
@ -278,7 +278,7 @@ class DatabasesController extends AbstractController
|
||||
/**
|
||||
* Prepares the statistics columns
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
private function getStatisticsColumns(): array
|
||||
{
|
||||
|
||||
@ -25,7 +25,7 @@ final class KillController extends AbstractController
|
||||
parent::__construct($response, $template, $data);
|
||||
}
|
||||
|
||||
/** @param array $params Request parameters */
|
||||
/** @param mixed[] $params Request parameters */
|
||||
public function __invoke(ServerRequest $request, array $params): void
|
||||
{
|
||||
if (! $this->response->isAjax()) {
|
||||
|
||||
@ -96,7 +96,7 @@ class StatusController extends AbstractController
|
||||
return (int) $this->dbi->fetchValue('SELECT UNIX_TIMESTAMP() - ' . $this->data->status['Uptime']);
|
||||
}
|
||||
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
private function getTrafficInfo(): array
|
||||
{
|
||||
$hourFactor = 3600 / $this->data->status['Uptime'];
|
||||
@ -141,7 +141,7 @@ class StatusController extends AbstractController
|
||||
];
|
||||
}
|
||||
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
private function getConnectionsInfo(): array
|
||||
{
|
||||
$hourFactor = 3600 / $this->data->status['Uptime'];
|
||||
|
||||
@ -146,7 +146,7 @@ class VariablesController extends AbstractController
|
||||
$this->dbi->query('FLUSH ' . $flush . ';');
|
||||
}
|
||||
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
private function getAlerts(): array
|
||||
{
|
||||
// name => max value before alert
|
||||
@ -209,7 +209,7 @@ class VariablesController extends AbstractController
|
||||
/**
|
||||
* Returns a list of variable descriptions
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
private function getDescriptions(): array
|
||||
{
|
||||
|
||||
@ -22,7 +22,7 @@ final class GetVariableController extends AbstractController
|
||||
parent::__construct($response, $template);
|
||||
}
|
||||
|
||||
/** @param array $params Request parameters */
|
||||
/** @param mixed[] $params Request parameters */
|
||||
public function __invoke(ServerRequest $request, array $params): void
|
||||
{
|
||||
if (! $this->response->isAjax()) {
|
||||
|
||||
@ -30,7 +30,7 @@ final class SetVariableController extends AbstractController
|
||||
/**
|
||||
* Handle the AJAX request for setting value for a single variable
|
||||
*
|
||||
* @param array $vars Request parameters
|
||||
* @param mixed[] $vars Request parameters
|
||||
*/
|
||||
public function __invoke(ServerRequest $request, array $vars): void
|
||||
{
|
||||
@ -87,7 +87,7 @@ final class SetVariableController extends AbstractController
|
||||
* @param string $name variable name
|
||||
* @param int|string $value variable value
|
||||
*
|
||||
* @return array formatted string and bool if string is HTML formatted
|
||||
* @return mixed[] formatted string and bool if string is HTML formatted
|
||||
*/
|
||||
private function formatVariable(string $name, int|string $value): array
|
||||
{
|
||||
|
||||
@ -97,7 +97,7 @@ class VariablesController extends AbstractController
|
||||
* @param string $name variable name
|
||||
* @param int|string $value variable value
|
||||
*
|
||||
* @return array formatted string and bool if string is HTML formatted
|
||||
* @return mixed[] formatted string and bool if string is HTML formatted
|
||||
*/
|
||||
private function formatVariable(string $name, int|string $value): array
|
||||
{
|
||||
|
||||
@ -17,7 +17,7 @@ abstract class AbstractController
|
||||
{
|
||||
}
|
||||
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
protected function getPages(): array
|
||||
{
|
||||
$ignored = ['Config', 'Servers'];
|
||||
|
||||
@ -11,7 +11,7 @@ use function is_string;
|
||||
class ConfigController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* @param array $params Request parameters
|
||||
* @param mixed[] $params Request parameters
|
||||
*
|
||||
* @return string HTML
|
||||
*/
|
||||
|
||||
@ -15,7 +15,7 @@ use function ob_start;
|
||||
class FormController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* @param array $params Request parameters
|
||||
* @param mixed[] $params Request parameters
|
||||
*
|
||||
* @return string HTML
|
||||
*/
|
||||
|
||||
@ -16,7 +16,7 @@ use function is_string;
|
||||
class HomeController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* @param array $params Request parameters
|
||||
* @param mixed[] $params Request parameters
|
||||
*
|
||||
* @return string HTML
|
||||
*/
|
||||
|
||||
@ -16,7 +16,7 @@ use function ob_start;
|
||||
class ServersController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* @param array $params Request parameters
|
||||
* @param mixed[] $params Request parameters
|
||||
*
|
||||
* @return string HTML
|
||||
*/
|
||||
@ -52,7 +52,7 @@ class ServersController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
/** @param array $params Request parameters */
|
||||
/** @param mixed[] $params Request parameters */
|
||||
public function destroy(array $params): void
|
||||
{
|
||||
$id = isset($params['id']) && is_numeric($params['id']) && (int) $params['id'] >= 1 ? (int) $params['id'] : 0;
|
||||
|
||||
@ -33,10 +33,10 @@ use function strncasecmp;
|
||||
*/
|
||||
class FindReplaceController extends AbstractController
|
||||
{
|
||||
/** @var array */
|
||||
/** @var mixed[] */
|
||||
private array $columnNames = [];
|
||||
|
||||
/** @var array */
|
||||
/** @var mixed[] */
|
||||
private array $columnTypes = [];
|
||||
|
||||
private string $connectionCharSet;
|
||||
@ -234,7 +234,7 @@ class FindReplaceController extends AbstractController
|
||||
* @param string $replaceWith string to replace with
|
||||
* @param string $charSet character set of the connection
|
||||
*
|
||||
* @return array|bool Array containing original values, replaced values and count
|
||||
* @return mixed[]|bool Array containing original values, replaced values and count
|
||||
*/
|
||||
private function getRegexReplaceRows(
|
||||
int $columnIndex,
|
||||
|
||||
@ -235,9 +235,9 @@ final class RelationController extends AbstractController
|
||||
/**
|
||||
* Update for FK
|
||||
*
|
||||
* @param Table $table Table
|
||||
* @param array $options Options
|
||||
* @param array $relationsForeign External relations
|
||||
* @param Table $table Table
|
||||
* @param mixed[] $options Options
|
||||
* @param mixed[] $relationsForeign External relations
|
||||
*/
|
||||
private function updateForForeignKeys(Table $table, array $options, array $relationsForeign): void
|
||||
{
|
||||
@ -289,7 +289,7 @@ final class RelationController extends AbstractController
|
||||
/**
|
||||
* Update for internal relation
|
||||
*
|
||||
* @param array $relations Relations
|
||||
* @param mixed[] $relations Relations
|
||||
*/
|
||||
private function updateForInternalRelation(
|
||||
Table $table,
|
||||
|
||||
@ -44,31 +44,31 @@ class SearchController extends AbstractController
|
||||
/**
|
||||
* Names of columns
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $columnNames = [];
|
||||
/**
|
||||
* Types of columns
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $columnTypes = [];
|
||||
/**
|
||||
* Types of columns without any replacement
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $originalColumnTypes = [];
|
||||
/**
|
||||
* Collations of columns
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $columnCollations = [];
|
||||
/**
|
||||
* Null Flags of columns
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $columnNullFlags = [];
|
||||
/**
|
||||
@ -78,7 +78,7 @@ class SearchController extends AbstractController
|
||||
/**
|
||||
* Foreign Keys
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $foreigners = [];
|
||||
|
||||
@ -310,7 +310,7 @@ class SearchController extends AbstractController
|
||||
* @param int $searchIndex Row number in table search form
|
||||
* @param int $columnIndex Column index in ColumnNames array
|
||||
*
|
||||
* @return array Array containing column's properties
|
||||
* @return mixed[] Array containing column's properties
|
||||
*/
|
||||
public function getColumnProperties(int $searchIndex, int $columnIndex): array
|
||||
{
|
||||
|
||||
@ -341,7 +341,7 @@ final class SaveController extends AbstractController
|
||||
/**
|
||||
* Adjusts the Privileges for all the columns whose names have changed
|
||||
*
|
||||
* @param array $adjustPrivileges assoc array of old col names mapped to new
|
||||
* @param mixed[] $adjustPrivileges assoc array of old col names mapped to new
|
||||
* cols
|
||||
*/
|
||||
private function adjustColumnPrivileges(array $adjustPrivileges): bool
|
||||
|
||||
@ -128,9 +128,9 @@ class StructureController extends AbstractController
|
||||
/**
|
||||
* Displays the table structure ('show table' works correct since 3.23.03)
|
||||
*
|
||||
* @param array $columnsWithUniqueIndex Columns with unique index
|
||||
* @param array $fields Fields
|
||||
* @param array $columnsWithIndex Columns with index
|
||||
* @param mixed[] $columnsWithUniqueIndex Columns with unique index
|
||||
* @param mixed[] $fields Fields
|
||||
* @param mixed[] $columnsWithIndex Columns with index
|
||||
* @psalm-param non-empty-string $route
|
||||
*/
|
||||
protected function displayStructure(
|
||||
|
||||
@ -42,25 +42,25 @@ use function strtoupper;
|
||||
*/
|
||||
class ZoomSearchController extends AbstractController
|
||||
{
|
||||
/** @var array */
|
||||
/** @var mixed[] */
|
||||
private array $columnNames = [];
|
||||
|
||||
/** @var array */
|
||||
/** @var mixed[] */
|
||||
private array $columnTypes = [];
|
||||
|
||||
/** @var array */
|
||||
/** @var mixed[] */
|
||||
private array $originalColumnTypes = [];
|
||||
|
||||
/** @var array */
|
||||
/** @var mixed[] */
|
||||
private array $columnCollations = [];
|
||||
|
||||
/** @var array */
|
||||
/** @var mixed[] */
|
||||
private array $columnNullFlags = [];
|
||||
|
||||
/** @var bool Whether a geometry column is present */
|
||||
private bool $geomColumnFlag = false;
|
||||
|
||||
/** @var array Foreign keys */
|
||||
/** @var mixed[] Foreign keys */
|
||||
private array $foreigners = [];
|
||||
|
||||
public function __construct(
|
||||
@ -401,7 +401,7 @@ class ZoomSearchController extends AbstractController
|
||||
* @param int $searchIndex Row number in table search form
|
||||
* @param int $columnIndex Column index in ColumnNames array
|
||||
*
|
||||
* @return array Array containing column's properties
|
||||
* @return mixed[] Array containing column's properties
|
||||
*/
|
||||
public function getColumnProperties(int $searchIndex, int $columnIndex): array
|
||||
{
|
||||
|
||||
@ -175,6 +175,7 @@ class CreateController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
/** @param mixed[] $view */
|
||||
private function setSuccessResponse(array $view, bool $ajaxdialog, ServerRequest $request): void
|
||||
{
|
||||
// If different column names defined for VIEW
|
||||
@ -221,6 +222,8 @@ class CreateController extends AbstractController
|
||||
|
||||
/**
|
||||
* Creates the view
|
||||
*
|
||||
* @param mixed[] $view
|
||||
*/
|
||||
private function getSqlQuery(bool $createview, array $view): string
|
||||
{
|
||||
|
||||
@ -185,9 +185,9 @@ class Core
|
||||
* Checks given $page against given $allowList and returns true if valid
|
||||
* it optionally ignores query parameters in $page (script.php?ignored)
|
||||
*
|
||||
* @param string $page page to check
|
||||
* @param array $allowList allow list to check page against
|
||||
* @param bool $include whether the page is going to be included
|
||||
* @param string $page page to check
|
||||
* @param mixed[] $allowList allow list to check page against
|
||||
* @param bool $include whether the page is going to be included
|
||||
*/
|
||||
public static function checkPageValidity(string $page, array $allowList = [], bool $include = false): bool
|
||||
{
|
||||
@ -397,11 +397,11 @@ class Core
|
||||
* $path is a string describing position of an element in an associative array,
|
||||
* eg. Servers/1/host refers to $array[Servers][1][host]
|
||||
*
|
||||
* @param string $path path in the array
|
||||
* @param array $array the array
|
||||
* @param mixed $default default value
|
||||
* @param string $path path in the array
|
||||
* @param mixed[] $array the array
|
||||
* @param mixed $default default value
|
||||
*
|
||||
* @return array|mixed|null array element or $default
|
||||
* @return mixed[]|mixed|null array element or $default
|
||||
*/
|
||||
public static function arrayRead(string $path, array $array, mixed $default = null): mixed
|
||||
{
|
||||
@ -421,9 +421,9 @@ class Core
|
||||
/**
|
||||
* Stores value in an array
|
||||
*
|
||||
* @param string $path path in the array
|
||||
* @param array $array the array
|
||||
* @param mixed $value value to store
|
||||
* @param string $path path in the array
|
||||
* @param mixed[] $array the array
|
||||
* @param mixed $value value to store
|
||||
*/
|
||||
public static function arrayWrite(string $path, array &$array, mixed $value): void
|
||||
{
|
||||
@ -444,8 +444,8 @@ class Core
|
||||
/**
|
||||
* Removes value from an array
|
||||
*
|
||||
* @param string $path path in the array
|
||||
* @param array $array the array
|
||||
* @param string $path path in the array
|
||||
* @param mixed[] $array the array
|
||||
*/
|
||||
public static function arrayRemove(string $path, array &$array): void
|
||||
{
|
||||
@ -584,7 +584,7 @@ class Core
|
||||
/**
|
||||
* Displays SQL query before executing.
|
||||
*
|
||||
* @param array|string $queryData Array containing queries or query itself
|
||||
* @param mixed[]|string $queryData Array containing queries or query itself
|
||||
*/
|
||||
public static function previewSQL(array|string $queryData): void
|
||||
{
|
||||
@ -630,7 +630,7 @@ class Core
|
||||
/**
|
||||
* Creates some globals from $_POST variables matching a pattern
|
||||
*
|
||||
* @param array $postPatterns The patterns to search for
|
||||
* @param mixed[] $postPatterns The patterns to search for
|
||||
*/
|
||||
public static function setPostAsGlobal(array $postPatterns): void
|
||||
{
|
||||
|
||||
@ -29,7 +29,7 @@ class CreateAddField
|
||||
/**
|
||||
* Transforms the radio button field_key into 4 arrays
|
||||
*
|
||||
* @return array An array of arrays which represents column keys for each index type
|
||||
* @return mixed[] An array of arrays which represents column keys for each index type
|
||||
* @psalm-return array{int, array, array, array, array, array}
|
||||
*/
|
||||
private function getIndexedColumns(): array
|
||||
@ -52,7 +52,7 @@ class CreateAddField
|
||||
* @param bool $isCreateTable true if requirement is to get the statement
|
||||
* for table creation
|
||||
*
|
||||
* @return array An array of initial sql statements
|
||||
* @return mixed[] An array of initial sql statements
|
||||
* according to the request
|
||||
*/
|
||||
private function buildColumnCreationStatement(
|
||||
@ -132,11 +132,11 @@ class CreateAddField
|
||||
/**
|
||||
* Create relevant index statements
|
||||
*
|
||||
* @param array $index an array of index columns
|
||||
* @param string $indexChoice index choice that which represents
|
||||
* the index type of $indexed_fields
|
||||
* @param bool $isCreateTable true if requirement is to get the statement
|
||||
* for table creation
|
||||
* @param mixed[] $index an array of index columns
|
||||
* @param string $indexChoice index choice that which represents
|
||||
* the index type of $indexed_fields
|
||||
* @param bool $isCreateTable true if requirement is to get the statement
|
||||
* for table creation
|
||||
*
|
||||
* @return string sql statement for indexes
|
||||
*/
|
||||
@ -304,8 +304,8 @@ class CreateAddField
|
||||
/**
|
||||
* Returns the definition of a partition/subpartition
|
||||
*
|
||||
* @param array $partition array of partition/subpartition details
|
||||
* @param bool $isSubPartition whether a subpartition
|
||||
* @param mixed[] $partition array of partition/subpartition details
|
||||
* @param bool $isSubPartition whether a subpartition
|
||||
*
|
||||
* @return string partition/subpartition definition
|
||||
*/
|
||||
|
||||
@ -70,7 +70,7 @@ class CentralColumns
|
||||
/**
|
||||
* Defines the central_columns parameters for the current user
|
||||
*
|
||||
* @return array|bool the central_columns parameters for the current user
|
||||
* @return mixed[]|bool the central_columns parameters for the current user
|
||||
*/
|
||||
public function getParams(): array|bool
|
||||
{
|
||||
@ -104,7 +104,7 @@ class CentralColumns
|
||||
* @param int $from starting offset of first result
|
||||
* @param int $num maximum number of results to return
|
||||
*
|
||||
* @return array list of $num columns present in central columns list
|
||||
* @return mixed[] list of $num columns present in central columns list
|
||||
* starting at offset $from for the given database
|
||||
*/
|
||||
public function getColumnsList(string $db, int $from = 0, int $num = 25): array
|
||||
@ -169,7 +169,7 @@ class CentralColumns
|
||||
* @param bool $allFields set if need all the fields of existing columns,
|
||||
* otherwise only column_name is returned
|
||||
*
|
||||
* @return array list of columns in central columns among given set of columns
|
||||
* @return mixed[] list of columns in central columns among given set of columns
|
||||
*/
|
||||
private function findExistingColNames(
|
||||
string $db,
|
||||
@ -203,10 +203,10 @@ class CentralColumns
|
||||
* build the insert query for central columns list given PMA storage
|
||||
* db, central_columns table, column name and corresponding definition to be added
|
||||
*
|
||||
* @param string $column column to add into central list
|
||||
* @param array $def list of attributes of the column being added
|
||||
* @param string $db PMA configuration storage database name
|
||||
* @param string $centralListTable central columns configuration storage table name
|
||||
* @param string $column column to add into central list
|
||||
* @param mixed[] $def list of attributes of the column being added
|
||||
* @param string $db PMA configuration storage database name
|
||||
* @param string $centralListTable central columns configuration storage table name
|
||||
*
|
||||
* @return string query string to insert the given column
|
||||
* with definition into central list
|
||||
@ -253,11 +253,11 @@ class CentralColumns
|
||||
* are added to central list otherwise the $field_select is considered as
|
||||
* list of columns and these columns are added to central list if not already added
|
||||
*
|
||||
* @param array $fieldSelect if $isTable is true selected tables list
|
||||
* otherwise selected columns list
|
||||
* @param bool $isTable if passed array is of tables or columns
|
||||
* @param string $table if $isTable is false, then table name to
|
||||
* which columns belong
|
||||
* @param mixed[] $fieldSelect if $isTable is true selected tables list
|
||||
* otherwise selected columns list
|
||||
* @param bool $isTable if passed array is of tables or columns
|
||||
* @param string $table if $isTable is false, then table name to
|
||||
* which columns belong
|
||||
*
|
||||
* @return true|Message
|
||||
*/
|
||||
@ -359,10 +359,10 @@ class CentralColumns
|
||||
* central columns list otherwise $field_select is columns list and it removes
|
||||
* given columns if present in central list
|
||||
*
|
||||
* @param string $database Database name
|
||||
* @param array $fieldSelect if $isTable selected list of tables otherwise
|
||||
* selected list of columns to remove from central list
|
||||
* @param bool $isTable if passed array is of tables or columns
|
||||
* @param string $database Database name
|
||||
* @param mixed[] $fieldSelect if $isTable selected list of tables otherwise
|
||||
* selected list of columns to remove from central list
|
||||
* @param bool $isTable if passed array is of tables or columns
|
||||
*
|
||||
* @return true|Message
|
||||
*/
|
||||
@ -527,7 +527,7 @@ class CentralColumns
|
||||
* @param bool $allFields set if need all the fields of existing columns,
|
||||
* otherwise only column_name is returned
|
||||
*
|
||||
* @return array columns present in central list from given table of given db.
|
||||
* @return mixed[] columns present in central list from given table of given db.
|
||||
*/
|
||||
public function getFromTable(
|
||||
string $db,
|
||||
@ -626,7 +626,7 @@ class CentralColumns
|
||||
/**
|
||||
* Update Multiple column in central columns list if a change is requested
|
||||
*
|
||||
* @param array $params Request parameters
|
||||
* @param mixed[] $params Request parameters
|
||||
*
|
||||
* @return true|Message
|
||||
*/
|
||||
@ -669,9 +669,9 @@ class CentralColumns
|
||||
/**
|
||||
* build html for editing a row in central columns table
|
||||
*
|
||||
* @param array $row array contains complete information of a
|
||||
* @param mixed[] $row array contains complete information of a
|
||||
* particular row of central list table
|
||||
* @param int $rowNum position the row in the table
|
||||
* @param int $rowNum position the row in the table
|
||||
*
|
||||
* @return string html of a particular row in the central columns table.
|
||||
*/
|
||||
@ -726,7 +726,7 @@ class CentralColumns
|
||||
* @param string $db selected database
|
||||
* @param string $table current table name
|
||||
*
|
||||
* @return array encoded list of columns present in central list for the given
|
||||
* @return mixed[] encoded list of columns present in central list for the given
|
||||
* database
|
||||
*/
|
||||
public function getListRaw(string $db, string $table): array
|
||||
@ -769,7 +769,7 @@ class CentralColumns
|
||||
* Column `col_extra` is used to store both extra and attributes for a column.
|
||||
* This method separates them.
|
||||
*
|
||||
* @param array $columnsList columns list
|
||||
* @param mixed[] $columnsList columns list
|
||||
*/
|
||||
private function handleColumnExtra(array &$columnsList): void
|
||||
{
|
||||
@ -799,8 +799,8 @@ class CentralColumns
|
||||
/**
|
||||
* Get HTML for editing page central columns
|
||||
*
|
||||
* @param array $selectedFld Array containing the selected fields
|
||||
* @param string $selectedDb String containing the name of database
|
||||
* @param mixed[] $selectedFld Array containing the selected fields
|
||||
* @param string $selectedDb String containing the name of database
|
||||
*
|
||||
* @return string HTML for complete editing page for central columns
|
||||
*/
|
||||
@ -878,7 +878,7 @@ class CentralColumns
|
||||
* @param int $pos offset of first result with complete result set
|
||||
* @param string $textDir table footer arrow direction
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getTemplateVariablesForMain(
|
||||
string $db,
|
||||
|
||||
@ -73,7 +73,7 @@ class Designer
|
||||
*
|
||||
* @param string $db database name
|
||||
*
|
||||
* @return array array of schema page id and names
|
||||
* @return mixed[] array of schema page id and names
|
||||
*/
|
||||
private function getPageIdsAndNames(string $db): array
|
||||
{
|
||||
@ -135,7 +135,7 @@ class Designer
|
||||
/**
|
||||
* Returns array of stored values of Designer Settings
|
||||
*
|
||||
* @return array stored values
|
||||
* @return mixed[] stored values
|
||||
*/
|
||||
private function getSideMenuParamsArray(): array
|
||||
{
|
||||
@ -213,11 +213,11 @@ class Designer
|
||||
*
|
||||
* @param string $db The database name from the request
|
||||
* @param DesignerTable[] $designerTables The designer tables
|
||||
* @param array $tabPos tables positions
|
||||
* @param mixed[] $tabPos tables positions
|
||||
* @param int $displayPage page number of the selected page
|
||||
* @param array $tabColumn table column info
|
||||
* @param array $tablesAllKeys all indices
|
||||
* @param array $tablesPkOrUniqueKeys unique or primary indices
|
||||
* @param mixed[] $tabColumn table column info
|
||||
* @param mixed[] $tablesAllKeys all indices
|
||||
* @param mixed[] $tablesPkOrUniqueKeys unique or primary indices
|
||||
*
|
||||
* @return string html
|
||||
*/
|
||||
@ -286,17 +286,17 @@ class Designer
|
||||
* @param string $db database in use
|
||||
* @param string $getDb database in url
|
||||
* @param DesignerTable[] $designerTables The designer tables
|
||||
* @param array $scriptTables array on foreign key support for each table
|
||||
* @param array $scriptContr initialization data array
|
||||
* @param mixed[] $scriptTables array on foreign key support for each table
|
||||
* @param mixed[] $scriptContr initialization data array
|
||||
* @param DesignerTable[] $scriptDisplayField displayed tables in designer with their display fields
|
||||
* @param int $displayPage page number of the selected page
|
||||
* @param bool $visualBuilderMode whether this is visual query builder
|
||||
* @param string|null $selectedPage name of the selected page
|
||||
* @param array $paramsArray array with class name for various buttons on side menu
|
||||
* @param array $tablePositions table positions
|
||||
* @param array $tabColumn table column info
|
||||
* @param array $tablesAllKeys all indices
|
||||
* @param array $tablesPkOrUniqueKeys unique or primary indices
|
||||
* @param mixed[] $paramsArray array with class name for various buttons on side menu
|
||||
* @param mixed[] $tablePositions table positions
|
||||
* @param mixed[] $tabColumn table column info
|
||||
* @param mixed[] $tablesAllKeys all indices
|
||||
* @param mixed[] $tablesPkOrUniqueKeys unique or primary indices
|
||||
*
|
||||
* @return string html
|
||||
*/
|
||||
|
||||
@ -76,7 +76,7 @@ class Common
|
||||
*
|
||||
* @param DesignerTable[] $designerTables The designer tables
|
||||
*
|
||||
* @return array table column nfo
|
||||
* @return mixed[] table column nfo
|
||||
*/
|
||||
public function getColumnsInfo(array $designerTables): array
|
||||
{
|
||||
@ -112,7 +112,7 @@ class Common
|
||||
*
|
||||
* @param DesignerTable[] $designerTables The designer tables
|
||||
*
|
||||
* @return array JavaScript code
|
||||
* @return mixed[] JavaScript code
|
||||
*/
|
||||
public function getScriptContr(array $designerTables): array
|
||||
{
|
||||
@ -185,7 +185,7 @@ class Common
|
||||
*
|
||||
* @param DesignerTable[] $designerTables The designer tables
|
||||
*
|
||||
* @return array unique or primary indices
|
||||
* @return mixed[] unique or primary indices
|
||||
*/
|
||||
public function getPkOrUniqueKeys(array $designerTables): array
|
||||
{
|
||||
@ -198,7 +198,7 @@ class Common
|
||||
* @param DesignerTable[] $designerTables The designer tables
|
||||
* @param bool $uniqueOnly whether to include only unique ones
|
||||
*
|
||||
* @return array indices
|
||||
* @return mixed[] indices
|
||||
*/
|
||||
public function getAllKeys(array $designerTables, bool $uniqueOnly = false): array
|
||||
{
|
||||
@ -227,7 +227,7 @@ class Common
|
||||
*
|
||||
* @param DesignerTable[] $designerTables The designer tables
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getScriptTabs(array $designerTables): array
|
||||
{
|
||||
@ -247,7 +247,7 @@ class Common
|
||||
*
|
||||
* @param int $pg pdf page id
|
||||
*
|
||||
* @return array of table positions
|
||||
* @return mixed[] of table positions
|
||||
*/
|
||||
public function getTablePositions(int $pg): array
|
||||
{
|
||||
@ -624,7 +624,7 @@ class Common
|
||||
* @param string $t2 master db.table
|
||||
* @param string $f2 master field
|
||||
*
|
||||
* @return array array of success/failure and message
|
||||
* @return mixed[] array of success/failure and message
|
||||
*/
|
||||
public function removeRelation(string $t1, string $f1, string $t2, string $f2): array
|
||||
{
|
||||
|
||||
@ -256,7 +256,7 @@ class Events
|
||||
/**
|
||||
* This function will generate the values that are required to for the editor
|
||||
*
|
||||
* @return array Data necessary to create the editor.
|
||||
* @return mixed[] Data necessary to create the editor.
|
||||
*/
|
||||
public function getDataFromRequest(): array
|
||||
{
|
||||
@ -295,7 +295,7 @@ class Events
|
||||
*
|
||||
* @param string $name The name of the event.
|
||||
*
|
||||
* @return array|null Data necessary to create the editor.
|
||||
* @return mixed[]|null Data necessary to create the editor.
|
||||
*/
|
||||
public function getDataFromName(string $name): array|null
|
||||
{
|
||||
@ -340,13 +340,13 @@ class Events
|
||||
/**
|
||||
* Displays a form used to add/edit an event
|
||||
*
|
||||
* @param string $mode If the editor will be used to edit an event
|
||||
* or add a new one: 'edit' or 'add'.
|
||||
* @param string $operation If the editor was previously invoked with
|
||||
* JS turned off, this will hold the name of
|
||||
* the current operation
|
||||
* @param array $item Data for the event returned by
|
||||
* getDataFromRequest() or getDataFromName()
|
||||
* @param string $mode If the editor will be used to edit an event
|
||||
* or add a new one: 'edit' or 'add'.
|
||||
* @param string $operation If the editor was previously invoked with
|
||||
* JS turned off, this will hold the name of
|
||||
* the current operation
|
||||
* @param mixed[] $item Data for the event returned by
|
||||
* getDataFromRequest() or getDataFromName()
|
||||
*
|
||||
* @return string HTML code for the editor.
|
||||
*/
|
||||
@ -470,9 +470,9 @@ class Events
|
||||
|
||||
/**
|
||||
* @param string|null $createStatement Query
|
||||
* @param array $errors Errors
|
||||
* @param mixed[] $errors Errors
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
private function checkResult(string|null $createStatement, array $errors): array
|
||||
{
|
||||
@ -492,11 +492,11 @@ class Events
|
||||
/**
|
||||
* Send editor via ajax or by echoing.
|
||||
*
|
||||
* @param string $mode Editor mode 'add' or 'edit'
|
||||
* @param array|null $item Data necessary to create the editor
|
||||
* @param string $title Title of the editor
|
||||
* @param string $db Database
|
||||
* @param string $operation Operation 'change' or ''
|
||||
* @param string $mode Editor mode 'add' or 'edit'
|
||||
* @param mixed[]|null $item Data necessary to create the editor
|
||||
* @param string $title Title of the editor
|
||||
* @param string $db Database
|
||||
* @param string $operation Operation 'change' or ''
|
||||
*/
|
||||
private function sendEditor(string $mode, array|null $item, string $title, string $db, string $operation): void
|
||||
{
|
||||
@ -588,7 +588,7 @@ class Events
|
||||
* @param string $db db name
|
||||
* @param string $name event name
|
||||
*
|
||||
* @return array information about EVENTs
|
||||
* @return mixed[] information about EVENTs
|
||||
*/
|
||||
public function getDetails(string $db, string $name = ''): array
|
||||
{
|
||||
|
||||
@ -52,13 +52,13 @@ class Qbe
|
||||
/**
|
||||
* Table Names (selected/non-selected)
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $criteriaTables = [];
|
||||
/**
|
||||
* Column Names
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $columnNames = [];
|
||||
/**
|
||||
@ -80,37 +80,37 @@ class Qbe
|
||||
/**
|
||||
* Whether to insert a new row
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $criteriaRowInsert;
|
||||
/**
|
||||
* Whether to delete a row
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $criteriaRowDelete;
|
||||
/**
|
||||
* Already set criteria values
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $criteria;
|
||||
/**
|
||||
* Previously set criteria values
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $prevCriteria;
|
||||
/**
|
||||
* AND/OR relation b/w criteria columns
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $criteriaAndOrColumn;
|
||||
/**
|
||||
* AND/OR relation b/w criteria rows
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $criteriaAndOrRow;
|
||||
/**
|
||||
@ -124,49 +124,49 @@ class Qbe
|
||||
/**
|
||||
* Selected columns in the form
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $formColumns = [];
|
||||
/**
|
||||
* Entered aliases in the form
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $formAliases = [];
|
||||
/**
|
||||
* Chosen sort options in the form
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $formSorts = [];
|
||||
/**
|
||||
* Chosen sort orders in the form
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $formSortOrders = [];
|
||||
/**
|
||||
* Show checkboxes in the form
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $formShows = [];
|
||||
/**
|
||||
* Entered criteria values in the form
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $formCriterions = [];
|
||||
/**
|
||||
* AND/OR column radio buttons in the form
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $formAndOrCols;
|
||||
/**
|
||||
* AND/OR row radio buttons in the form
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $formAndOrRows;
|
||||
/**
|
||||
@ -180,7 +180,7 @@ class Qbe
|
||||
/**
|
||||
* List of saved searches
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $savedSearchList = [];
|
||||
/**
|
||||
@ -190,7 +190,7 @@ class Qbe
|
||||
|
||||
/**
|
||||
* @param string $dbname Database name
|
||||
* @param array $savedSearchList List of saved searches
|
||||
* @param mixed[] $savedSearchList List of saved searches
|
||||
* @param SavedSearches|null $currentSearch Current search id
|
||||
*/
|
||||
public function __construct(
|
||||
@ -703,9 +703,9 @@ class Qbe
|
||||
* Provides And/Or modification cell along with Insert/Delete options
|
||||
* (For modifying search form's table columns)
|
||||
*
|
||||
* @param int $columnNumber Column Number (0,1,2) or more
|
||||
* @param array|null $selected Selected criteria column name
|
||||
* @param bool $lastColumn Whether this is the last column
|
||||
* @param int $columnNumber Column Number (0,1,2) or more
|
||||
* @param mixed[]|null $selected Selected criteria column name
|
||||
* @param bool $lastColumn Whether this is the last column
|
||||
*
|
||||
* @return string HTML for modification cell
|
||||
*/
|
||||
@ -1071,11 +1071,11 @@ class Qbe
|
||||
/**
|
||||
* Provides UNIQUE columns and INDEX columns present in criteria tables
|
||||
*
|
||||
* @param array $searchTables Tables involved in the search
|
||||
* @param array $searchColumns Columns involved in the search
|
||||
* @param array $whereClauseColumns Columns having criteria where clause
|
||||
* @param mixed[] $searchTables Tables involved in the search
|
||||
* @param mixed[] $searchColumns Columns involved in the search
|
||||
* @param mixed[] $whereClauseColumns Columns having criteria where clause
|
||||
*
|
||||
* @return array having UNIQUE and INDEX columns
|
||||
* @return mixed[] having UNIQUE and INDEX columns
|
||||
*/
|
||||
private function getIndexes(
|
||||
array $searchTables,
|
||||
@ -1115,11 +1115,11 @@ class Qbe
|
||||
/**
|
||||
* Provides UNIQUE columns and INDEX columns present in criteria tables
|
||||
*
|
||||
* @param array $searchTables Tables involved in the search
|
||||
* @param array $searchColumns Columns involved in the search
|
||||
* @param array $whereClauseColumns Columns having criteria where clause
|
||||
* @param mixed[] $searchTables Tables involved in the search
|
||||
* @param mixed[] $searchColumns Columns involved in the search
|
||||
* @param mixed[] $whereClauseColumns Columns having criteria where clause
|
||||
*
|
||||
* @return array having UNIQUE and INDEX columns
|
||||
* @return mixed[] having UNIQUE and INDEX columns
|
||||
*/
|
||||
private function getLeftJoinColumnCandidates(
|
||||
array $searchTables,
|
||||
@ -1174,10 +1174,10 @@ class Qbe
|
||||
/**
|
||||
* Provides the main table to form the LEFT JOIN clause
|
||||
*
|
||||
* @param array $searchTables Tables involved in the search
|
||||
* @param array $searchColumns Columns involved in the search
|
||||
* @param array $whereClauseColumns Columns having criteria where clause
|
||||
* @param array $whereClauseTables Tables having criteria where clause
|
||||
* @param mixed[] $searchTables Tables involved in the search
|
||||
* @param mixed[] $searchColumns Columns involved in the search
|
||||
* @param mixed[] $whereClauseColumns Columns having criteria where clause
|
||||
* @param mixed[] $whereClauseTables Tables having criteria where clause
|
||||
*
|
||||
* @return string table name
|
||||
*/
|
||||
@ -1265,7 +1265,7 @@ class Qbe
|
||||
/**
|
||||
* Provides columns and tables that have valid where clause criteria
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
private function getWhereClauseTablesAndColumns(): array
|
||||
{
|
||||
@ -1305,7 +1305,7 @@ class Qbe
|
||||
/**
|
||||
* Provides FROM clause for building SQL query
|
||||
*
|
||||
* @param array $formColumns List of selected columns in the form
|
||||
* @param mixed[] $formColumns List of selected columns in the form
|
||||
*
|
||||
* @return string FROM clause
|
||||
*/
|
||||
@ -1349,8 +1349,8 @@ class Qbe
|
||||
/**
|
||||
* Formulates the WHERE clause by JOINing tables
|
||||
*
|
||||
* @param array $searchTables Tables involved in the search
|
||||
* @param array $searchColumns Columns involved in the search
|
||||
* @param mixed[] $searchTables Tables involved in the search
|
||||
* @param mixed[] $searchColumns Columns involved in the search
|
||||
*
|
||||
* @return string table name
|
||||
*/
|
||||
@ -1466,8 +1466,8 @@ class Qbe
|
||||
/**
|
||||
* Loads relations for a given table into the $relations array
|
||||
*
|
||||
* @param array $relations
|
||||
* @param string $oneTable the table
|
||||
* @param mixed[] $relations
|
||||
* @param string $oneTable the table
|
||||
*/
|
||||
private function loadRelationsForTable(array &$relations, string $oneTable): void
|
||||
{
|
||||
@ -1502,9 +1502,9 @@ class Qbe
|
||||
/**
|
||||
* Fills the $finalized arrays with JOIN clauses for each of the tables
|
||||
*
|
||||
* @param array $finalized JOIN clauses for each table
|
||||
* @param array $relations Relations among tables
|
||||
* @param array $searchTables Tables involved in the search
|
||||
* @param mixed[] $finalized JOIN clauses for each table
|
||||
* @param mixed[] $relations Relations among tables
|
||||
* @param mixed[] $searchTables Tables involved in the search
|
||||
*/
|
||||
private function fillJoinClauses(array &$finalized, array $relations, array $searchTables): void
|
||||
{
|
||||
@ -1546,7 +1546,7 @@ class Qbe
|
||||
/**
|
||||
* Provides the generated SQL query
|
||||
*
|
||||
* @param array $formColumns List of selected columns in the form
|
||||
* @param mixed[] $formColumns List of selected columns in the form
|
||||
*
|
||||
* @return string SQL query
|
||||
*/
|
||||
@ -1688,12 +1688,12 @@ class Qbe
|
||||
/**
|
||||
* Get best
|
||||
*
|
||||
* @param array $searchTables Tables involved in the search
|
||||
* @param array|null $whereClauseColumns Columns with where clause
|
||||
* @param array|null $uniqueColumns Unique columns
|
||||
* @param array|null $indexColumns Indexed columns
|
||||
* @param mixed[] $searchTables Tables involved in the search
|
||||
* @param mixed[]|null $whereClauseColumns Columns with where clause
|
||||
* @param mixed[]|null $uniqueColumns Unique columns
|
||||
* @param mixed[]|null $indexColumns Indexed columns
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
private function getLeftJoinColumnCandidatesBest(
|
||||
array $searchTables,
|
||||
|
||||
@ -162,10 +162,10 @@ class Routines
|
||||
/**
|
||||
* Handle request to create or edit a routine
|
||||
*
|
||||
* @param array $errors Errors
|
||||
* @param string $db DB name
|
||||
* @param mixed[] $errors Errors
|
||||
* @param string $db DB name
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function handleRequestCreateOrEdit(array $errors, string $db): array
|
||||
{
|
||||
@ -289,7 +289,7 @@ class Routines
|
||||
/**
|
||||
* Backup the privileges
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function backupPrivileges(): array
|
||||
{
|
||||
@ -315,11 +315,11 @@ class Routines
|
||||
/**
|
||||
* Create the routine
|
||||
*
|
||||
* @param string $routineQuery Query to create routine
|
||||
* @param string $createRoutine Query to restore routine
|
||||
* @param array $privilegesBackup Privileges backup
|
||||
* @param string $routineQuery Query to create routine
|
||||
* @param string $createRoutine Query to restore routine
|
||||
* @param mixed[] $privilegesBackup Privileges backup
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function create(
|
||||
string $routineQuery,
|
||||
@ -409,7 +409,7 @@ class Routines
|
||||
* the 'Add another parameter', 'Remove last parameter' and
|
||||
* 'Change routine type' functionalities when JS is disabled.
|
||||
*
|
||||
* @return array Data necessary to create the routine editor.
|
||||
* @return mixed[] Data necessary to create the routine editor.
|
||||
*/
|
||||
public function getDataFromRequest(): array
|
||||
{
|
||||
@ -527,7 +527,7 @@ class Routines
|
||||
* @param string $type Type of routine (ROUTINE|PROCEDURE)
|
||||
* @param bool $all Whether to return all data or just the info about parameters.
|
||||
*
|
||||
* @return array|null Data necessary to create the routine editor.
|
||||
* @return mixed[]|null Data necessary to create the routine editor.
|
||||
*/
|
||||
public function getDataFromName(string $name, string $type, bool $all = true): array|null
|
||||
{
|
||||
@ -637,12 +637,12 @@ class Routines
|
||||
/**
|
||||
* Creates one row for the parameter table used in the routine editor.
|
||||
*
|
||||
* @param array $routine Data for the routine returned by
|
||||
* getDataFromRequest() or getDataFromName()
|
||||
* @param mixed $index Either a numeric index of the row being processed
|
||||
* or NULL to create a template row for AJAX request
|
||||
* @param string $class Class used to hide the direction column, if the
|
||||
* row is for a stored function.
|
||||
* @param mixed[] $routine Data for the routine returned by
|
||||
* getDataFromRequest() or getDataFromName()
|
||||
* @param mixed $index Either a numeric index of the row being processed
|
||||
* or NULL to create a template row for AJAX request
|
||||
* @param string $class Class used to hide the direction column, if the
|
||||
* row is for a stored function.
|
||||
*
|
||||
* @return string HTML code of one row of parameter table for the editor.
|
||||
*/
|
||||
@ -702,13 +702,13 @@ class Routines
|
||||
/**
|
||||
* Displays a form used to add/edit a routine
|
||||
*
|
||||
* @param string $mode If the editor will be used to edit a routine
|
||||
* or add a new one: 'edit' or 'add'.
|
||||
* @param string $operation If the editor was previously invoked with
|
||||
* JS turned off, this will hold the name of
|
||||
* the current operation
|
||||
* @param array $routine Data for the routine returned by
|
||||
* getDataFromRequest() or getDataFromName()
|
||||
* @param string $mode If the editor will be used to edit a routine
|
||||
* or add a new one: 'edit' or 'add'.
|
||||
* @param string $operation If the editor was previously invoked with
|
||||
* JS turned off, this will hold the name of
|
||||
* the current operation
|
||||
* @param mixed[] $routine Data for the routine returned by
|
||||
* getDataFromRequest() or getDataFromName()
|
||||
*
|
||||
* @return string HTML code for the editor.
|
||||
*/
|
||||
@ -778,10 +778,10 @@ class Routines
|
||||
*
|
||||
* @param string[] $itemParamName The parameter names
|
||||
* @param string[] $itemParamDir The direction parameter (see $this->directions)
|
||||
* @param array $itemParamType The parameter type
|
||||
* @param array $itemParamLength A length or not for the parameter
|
||||
* @param array $itemParamOpsText An optional charset for the parameter
|
||||
* @param array $itemParamOpsNum An optional parameter for a $itemParamType NUMBER
|
||||
* @param mixed[] $itemParamType The parameter type
|
||||
* @param mixed[] $itemParamLength A length or not for the parameter
|
||||
* @param mixed[] $itemParamOpsText An optional charset for the parameter
|
||||
* @param mixed[] $itemParamOpsNum An optional parameter for a $itemParamType NUMBER
|
||||
* @param string $itemType The item type (PROCEDURE/FUNCTION)
|
||||
* @param bool $warnedAboutLength A boolean that will be switched if a the length warning is given
|
||||
*/
|
||||
@ -1051,7 +1051,7 @@ class Routines
|
||||
/**
|
||||
* @see handleExecuteRoutine
|
||||
*
|
||||
* @param array $routine The routine params
|
||||
* @param mixed[] $routine The routine params
|
||||
*
|
||||
* @return string[] The SQL queries / SQL query parts
|
||||
*/
|
||||
@ -1303,7 +1303,7 @@ class Routines
|
||||
/**
|
||||
* Browse row array
|
||||
*
|
||||
* @param array $row Columns
|
||||
* @param mixed[] $row Columns
|
||||
*/
|
||||
private function browseRow(array $row): string|null
|
||||
{
|
||||
@ -1324,7 +1324,7 @@ class Routines
|
||||
/**
|
||||
* Creates the HTML code that shows the routine execution dialog.
|
||||
*
|
||||
* @param array $routine Data for the routine returned by
|
||||
* @param mixed[] $routine Data for the routine returned by
|
||||
* getDataFromName()
|
||||
*
|
||||
* @return string HTML code for the routine execution dialog.
|
||||
@ -1408,8 +1408,8 @@ class Routines
|
||||
/**
|
||||
* Creates the contents for a row in the list of routines
|
||||
*
|
||||
* @param array $routine An array of routine data
|
||||
* @param string $rowClass Additional class
|
||||
* @param mixed[] $routine An array of routine data
|
||||
* @param string $rowClass Additional class
|
||||
*
|
||||
* @return string HTML code of a row for the list of routines
|
||||
*/
|
||||
@ -1497,10 +1497,10 @@ class Routines
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $createStatement Query
|
||||
* @param array $errors Errors
|
||||
* @param string $createStatement Query
|
||||
* @param mixed[] $errors Errors
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
private function checkResult(string $createStatement, array $errors): array
|
||||
{
|
||||
@ -1588,7 +1588,7 @@ class Routines
|
||||
* @param string|null $which PROCEDURE | FUNCTION or null for both
|
||||
* @param string $name name of the routine (to fetch a specific routine)
|
||||
*
|
||||
* @return array information about PROCEDUREs or FUNCTIONs
|
||||
* @return mixed[] information about PROCEDUREs or FUNCTIONs
|
||||
*/
|
||||
public static function getDetails(
|
||||
DatabaseInterface $dbi,
|
||||
|
||||
@ -32,12 +32,14 @@ class Search
|
||||
/**
|
||||
* Table Names
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $tablesNamesOnly;
|
||||
|
||||
/**
|
||||
* Type of search
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $searchTypes;
|
||||
|
||||
|
||||
@ -269,7 +269,7 @@ class Triggers
|
||||
/**
|
||||
* This function will generate the values that are required to for the editor
|
||||
*
|
||||
* @return array Data necessary to create the editor.
|
||||
* @return mixed[] Data necessary to create the editor.
|
||||
*/
|
||||
public function getDataFromRequest(): array
|
||||
{
|
||||
@ -296,7 +296,7 @@ class Triggers
|
||||
*
|
||||
* @param string $name The name of the trigger.
|
||||
*
|
||||
* @return array|null Data necessary to create the editor.
|
||||
* @return mixed[]|null Data necessary to create the editor.
|
||||
*/
|
||||
public function getDataFromName(string $name): array|null
|
||||
{
|
||||
@ -330,8 +330,8 @@ class Triggers
|
||||
/**
|
||||
* Displays a form used to add/edit a trigger
|
||||
*
|
||||
* @param string $mode If the editor will be used to edit a trigger or add a new one: 'edit' or 'add'.
|
||||
* @param array $item Data for the trigger returned by getDataFromRequest() or getDataFromName()
|
||||
* @param string $mode If the editor will be used to edit a trigger or add a new one: 'edit' or 'add'.
|
||||
* @param mixed[] $item Data for the trigger returned by getDataFromRequest() or getDataFromName()
|
||||
*/
|
||||
public function getEditorForm(string $db, string $table, string $mode, array $item): string
|
||||
{
|
||||
@ -409,10 +409,10 @@ class Triggers
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $createStatement Query
|
||||
* @param array $errors Errors
|
||||
* @param string $createStatement Query
|
||||
* @param mixed[] $errors Errors
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
private function checkResult(string $createStatement, array $errors): array
|
||||
{
|
||||
@ -432,11 +432,11 @@ class Triggers
|
||||
/**
|
||||
* Send editor via ajax or by echoing.
|
||||
*
|
||||
* @param string $mode Editor mode 'add' or 'edit'
|
||||
* @param array|null $item Data necessary to create the editor
|
||||
* @param string $title Title of the editor
|
||||
* @param string $db Database
|
||||
* @param string $table Table
|
||||
* @param string $mode Editor mode 'add' or 'edit'
|
||||
* @param mixed[]|null $item Data necessary to create the editor
|
||||
* @param string $title Title of the editor
|
||||
* @param string $db Database
|
||||
* @param string $table Table
|
||||
*/
|
||||
private function sendEditor(string $mode, array|null $item, string $title, string $db, string $table): void
|
||||
{
|
||||
@ -528,7 +528,7 @@ class Triggers
|
||||
* @param string $table table name
|
||||
* @param string $delimiter the delimiter to use (may be empty)
|
||||
*
|
||||
* @return array information about triggers (may be empty)
|
||||
* @return mixed[] information about triggers (may be empty)
|
||||
*/
|
||||
public static function getDetails(
|
||||
DatabaseInterface $dbi,
|
||||
|
||||
@ -340,17 +340,17 @@ class DatabaseInterface implements DbalInterface
|
||||
* $dbi->getTablesFull('my_database', 'my_tables_', true));
|
||||
* </code>
|
||||
*
|
||||
* @param string $database database
|
||||
* @param string|array $table table name(s)
|
||||
* @param bool $tableIsGroup $table is a table group
|
||||
* @param int $limitOffset zero-based offset for the count
|
||||
* @param bool|int $limitCount number of tables to return
|
||||
* @param string $sortBy table attribute to sort by
|
||||
* @param string $sortOrder direction to sort (ASC or DESC)
|
||||
* @param string|null $tableType whether table or view
|
||||
* @param string $database database
|
||||
* @param string|mixed[] $table table name(s)
|
||||
* @param bool $tableIsGroup $table is a table group
|
||||
* @param int $limitOffset zero-based offset for the count
|
||||
* @param bool|int $limitCount number of tables to return
|
||||
* @param string $sortBy table attribute to sort by
|
||||
* @param string $sortOrder direction to sort (ASC or DESC)
|
||||
* @param string|null $tableType whether table or view
|
||||
* @psalm-param ConnectionType $connectionType
|
||||
*
|
||||
* @return array list of tables in given db(s)
|
||||
* @return mixed[] list of tables in given db(s)
|
||||
*
|
||||
* @todo move into Table
|
||||
*/
|
||||
@ -636,7 +636,7 @@ class DatabaseInterface implements DbalInterface
|
||||
* @param bool|int $limitCount row count for LIMIT or true for $GLOBALS['cfg']['MaxDbList']
|
||||
* @psalm-param ConnectionType $connectionType
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*
|
||||
* @todo move into ListDatabase?
|
||||
*/
|
||||
@ -779,7 +779,7 @@ class DatabaseInterface implements DbalInterface
|
||||
* @param string|null $column name of specific column
|
||||
* @psalm-param ConnectionType $connectionType
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getColumnsFull(
|
||||
string|null $database = null,
|
||||
@ -842,7 +842,7 @@ class DatabaseInterface implements DbalInterface
|
||||
* @param bool $full whether to return full info or only column names
|
||||
* @psalm-param ConnectionType $connectionType
|
||||
*
|
||||
* @return array flat array description
|
||||
* @return mixed[] flat array description
|
||||
*/
|
||||
public function getColumn(
|
||||
string $database,
|
||||
@ -873,7 +873,7 @@ class DatabaseInterface implements DbalInterface
|
||||
* @param bool $full whether to return full info or only column names
|
||||
* @psalm-param ConnectionType $connectionType
|
||||
*
|
||||
* @return array[] array indexed by column names
|
||||
* @return mixed[][] array indexed by column names
|
||||
*/
|
||||
public function getColumns(
|
||||
string $database,
|
||||
@ -891,11 +891,11 @@ class DatabaseInterface implements DbalInterface
|
||||
/**
|
||||
* Attach index information to the column definition
|
||||
*
|
||||
* @param string $database name of database
|
||||
* @param string $table name of table to retrieve columns from
|
||||
* @param array[] $fields column array indexed by their names
|
||||
* @param string $database name of database
|
||||
* @param string $table name of table to retrieve columns from
|
||||
* @param mixed[][] $fields column array indexed by their names
|
||||
*
|
||||
* @return array[] Column defintions with index information
|
||||
* @return mixed[][] Column defintions with index information
|
||||
*/
|
||||
private function attachIndexInfoToColumns(
|
||||
string $database,
|
||||
@ -1204,7 +1204,7 @@ class DatabaseInterface implements DbalInterface
|
||||
/**
|
||||
* Returns row or element of a row
|
||||
*
|
||||
* @param array|string $row Row to process
|
||||
* @param mixed[]|string $row Row to process
|
||||
* @param string|int|null $value Which column to return
|
||||
*/
|
||||
private function fetchValueOrValueByIndex(array|string $row, string|int|null $value): mixed
|
||||
@ -1218,6 +1218,8 @@ class DatabaseInterface implements DbalInterface
|
||||
* @param ResultInterface $result result set identifier
|
||||
* @param string $mode either self::FETCH_NUM, self::FETCH_ASSOC or self::FETCH_BOTH
|
||||
* @psalm-param self::FETCH_NUM|self::FETCH_ASSOC $mode
|
||||
*
|
||||
* @return mixed[]
|
||||
*/
|
||||
private function fetchByMode(ResultInterface $result, string $mode): array
|
||||
{
|
||||
@ -1266,14 +1268,14 @@ class DatabaseInterface implements DbalInterface
|
||||
* // $users['admin']['John Doe'] = '123'
|
||||
* </code>
|
||||
*
|
||||
* @param string $query query to execute
|
||||
* @param string|int|array|null $key field-name or offset
|
||||
* @param string $query query to execute
|
||||
* @param string|int|mixed[]|null $key field-name or offset
|
||||
* used as key for array
|
||||
* or array of those
|
||||
* @param string|int|null $value value-name or offset used as value for array
|
||||
* @param string|int|null $value value-name or offset used as value for array
|
||||
* @psalm-param ConnectionType $connectionType
|
||||
*
|
||||
* @return array resultrows or values indexed by $key
|
||||
* @return mixed[] resultrows or values indexed by $key
|
||||
*/
|
||||
public function fetchResult(
|
||||
string $query,
|
||||
@ -1338,7 +1340,7 @@ class DatabaseInterface implements DbalInterface
|
||||
/**
|
||||
* Get supported SQL compatibility modes
|
||||
*
|
||||
* @return array supported SQL compatibility modes
|
||||
* @return mixed[] supported SQL compatibility modes
|
||||
*/
|
||||
public function getCompatibilities(): array
|
||||
{
|
||||
@ -1553,9 +1555,9 @@ class DatabaseInterface implements DbalInterface
|
||||
/**
|
||||
* Connects to the database server.
|
||||
*
|
||||
* @param int $mode Connection mode.
|
||||
* @param array|null $server Server information like host/port/socket/persistent
|
||||
* @param int|null $target How to store connection link, defaults to $mode
|
||||
* @param int $mode Connection mode.
|
||||
* @param mixed[]|null $server Server information like host/port/socket/persistent
|
||||
* @param int|null $target How to store connection link, defaults to $mode
|
||||
* @psalm-param ConnectionType $mode
|
||||
* @psalm-param ConnectionType|null $target
|
||||
*/
|
||||
|
||||
@ -85,17 +85,17 @@ interface DbalInterface
|
||||
* $dbi->getTablesFull('my_database', 'my_tables_', true));
|
||||
* </code>
|
||||
*
|
||||
* @param string $database database
|
||||
* @param string|array $table table name(s)
|
||||
* @param bool $tableIsGroup $table is a table group
|
||||
* @param int $limitOffset zero-based offset for the count
|
||||
* @param bool|int $limitCount number of tables to return
|
||||
* @param string $sortBy table attribute to sort by
|
||||
* @param string $sortOrder direction to sort (ASC or DESC)
|
||||
* @param string|null $tableType whether table or view
|
||||
* @param string $database database
|
||||
* @param string|mixed[] $table table name(s)
|
||||
* @param bool $tableIsGroup $table is a table group
|
||||
* @param int $limitOffset zero-based offset for the count
|
||||
* @param bool|int $limitCount number of tables to return
|
||||
* @param string $sortBy table attribute to sort by
|
||||
* @param string $sortOrder direction to sort (ASC or DESC)
|
||||
* @param string|null $tableType whether table or view
|
||||
* @psalm-param ConnectionType $connectionType
|
||||
*
|
||||
* @return array list of tables in given db(s)
|
||||
* @return mixed[] list of tables in given db(s)
|
||||
*
|
||||
* @todo move into Table
|
||||
*/
|
||||
@ -131,7 +131,7 @@ interface DbalInterface
|
||||
* @param bool|int $limitCount row count for LIMIT or true for $GLOBALS['cfg']['MaxDbList']
|
||||
* @psalm-param ConnectionType $connectionType
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*
|
||||
* @todo move into ListDatabase?
|
||||
*/
|
||||
@ -154,7 +154,7 @@ interface DbalInterface
|
||||
* @param string|null $column name of specific column
|
||||
* @psalm-param ConnectionType $connectionType
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getColumnsFull(
|
||||
string|null $database = null,
|
||||
@ -172,7 +172,7 @@ interface DbalInterface
|
||||
* @param bool $full whether to return full info or only column names
|
||||
* @psalm-param ConnectionType $connectionType
|
||||
*
|
||||
* @return array flat array description
|
||||
* @return mixed[] flat array description
|
||||
*/
|
||||
public function getColumn(
|
||||
string $database,
|
||||
@ -190,7 +190,7 @@ interface DbalInterface
|
||||
* @param bool $full whether to return full info or only column names
|
||||
* @psalm-param ConnectionType $connectionType
|
||||
*
|
||||
* @return array[] array indexed by column names
|
||||
* @return mixed[][] array indexed by column names
|
||||
*/
|
||||
public function getColumns(
|
||||
string $database,
|
||||
@ -384,12 +384,12 @@ interface DbalInterface
|
||||
* // $users['admin']['John Doe'] = '123'
|
||||
* </code>
|
||||
*
|
||||
* @param string $query query to execute
|
||||
* @param string|int|array|null $key field-name or offset used as key for array or array of those
|
||||
* @param string|int|null $value value-name or offset used as value for array
|
||||
* @param string $query query to execute
|
||||
* @param string|int|mixed[]|null $key field-name or offset used as key for array or array of those
|
||||
* @param string|int|null $value value-name or offset used as value for array
|
||||
* @psalm-param ConnectionType $connectionType
|
||||
*
|
||||
* @return array resultrows or values indexed by $key
|
||||
* @return mixed[] resultrows or values indexed by $key
|
||||
*/
|
||||
public function fetchResult(
|
||||
string $query,
|
||||
@ -401,7 +401,7 @@ interface DbalInterface
|
||||
/**
|
||||
* Get supported SQL compatibility modes
|
||||
*
|
||||
* @return array supported SQL compatibility modes
|
||||
* @return mixed[] supported SQL compatibility modes
|
||||
*/
|
||||
public function getCompatibilities(): array;
|
||||
|
||||
@ -410,7 +410,7 @@ interface DbalInterface
|
||||
*
|
||||
* @psalm-param ConnectionType $connectionType
|
||||
*
|
||||
* @return array warnings
|
||||
* @return mixed[] warnings
|
||||
*/
|
||||
public function getWarnings(int $connectionType = Connection::TYPE_USER): array;
|
||||
|
||||
@ -452,9 +452,9 @@ interface DbalInterface
|
||||
/**
|
||||
* Connects to the database server.
|
||||
*
|
||||
* @param int $mode Connection mode.
|
||||
* @param array|null $server Server information like host/port/socket/persistent
|
||||
* @param int|null $target How to store connection link, defaults to $mode
|
||||
* @param int $mode Connection mode.
|
||||
* @param mixed[]|null $server Server information like host/port/socket/persistent
|
||||
* @param int|null $target How to store connection link, defaults to $mode
|
||||
* @psalm-param ConnectionType $mode
|
||||
* @psalm-param ConnectionType|null $target
|
||||
*/
|
||||
|
||||
@ -683,12 +683,12 @@ class Results
|
||||
*
|
||||
* @see getTable()
|
||||
*
|
||||
* @param int $posNext the offset for the "next" page
|
||||
* @param int $posPrevious the offset for the "previous" page
|
||||
* @param bool $isInnodb whether its InnoDB or not
|
||||
* @param array $sortByKeyData the sort by key dialog
|
||||
* @param int $posNext the offset for the "next" page
|
||||
* @param int $posPrevious the offset for the "previous" page
|
||||
* @param bool $isInnodb whether its InnoDB or not
|
||||
* @param mixed[] $sortByKeyData the sort by key dialog
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
private function getTableNavigation(
|
||||
int $posNext,
|
||||
@ -760,10 +760,10 @@ class Results
|
||||
*
|
||||
* @see getTableHeaders()
|
||||
*
|
||||
* @param array $sortExpression sort expression
|
||||
* @param mixed[] $sortExpression sort expression
|
||||
* @param array<int, string> $sortExpressionNoDirection sort expression
|
||||
* without direction
|
||||
* @param array $sortDirection sort direction
|
||||
* @param mixed[] $sortDirection sort direction
|
||||
* @param bool $isLimitedDisplay with limited operations
|
||||
* or not
|
||||
* @param string $unsortedSqlQuery query without the sort part
|
||||
@ -875,9 +875,9 @@ class Results
|
||||
* @see getTable()
|
||||
*
|
||||
* @param string $unsortedSqlQuery the unsorted sql query
|
||||
* @param array $sortExpression sort expression
|
||||
* @param mixed[] $sortExpression sort expression
|
||||
* @param array<int, string> $sortExpressionNoDirection sort expression without direction
|
||||
* @param array $sortDirection sort direction
|
||||
* @param mixed[] $sortDirection sort direction
|
||||
* @param bool $isLimitedDisplay with limited operations or not
|
||||
*
|
||||
* @psalm-return array{
|
||||
@ -969,10 +969,10 @@ class Results
|
||||
*
|
||||
* @see getTableHeaders()
|
||||
*
|
||||
* @param array|null $sortExpression the sort expression
|
||||
* @param string $unsortedSqlQuery the unsorted sql query
|
||||
* @param mixed[]|null $sortExpression the sort expression
|
||||
* @param string $unsortedSqlQuery the unsorted sql query
|
||||
*
|
||||
* @return array[]
|
||||
* @return mixed[][]
|
||||
* @psalm-return array{hidden_fields?:array, options?:array}
|
||||
*/
|
||||
private function getSortByKeyDropDown(
|
||||
@ -1114,7 +1114,7 @@ class Results
|
||||
*
|
||||
* @see getTableHeaders()
|
||||
*
|
||||
* @return array table comments
|
||||
* @return mixed[] table comments
|
||||
*/
|
||||
private function getTableCommentsArray(StatementInfo $statementInfo): array
|
||||
{
|
||||
@ -1162,7 +1162,7 @@ class Results
|
||||
*
|
||||
* @see getTableHeaders()
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
private function getDataForResettingColumnOrder(StatementInfo $statementInfo): array
|
||||
{
|
||||
@ -1194,7 +1194,7 @@ class Results
|
||||
*
|
||||
* @see getTableHeaders()
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
private function getOptionsBlock(): array
|
||||
{
|
||||
@ -1259,7 +1259,7 @@ class Results
|
||||
*
|
||||
* @see getTableHeaders()
|
||||
*
|
||||
* @param array $commentsMap comments array
|
||||
* @param mixed[] $commentsMap comments array
|
||||
* @param FieldMetadata $fieldsMeta set of field properties
|
||||
*
|
||||
* @return string html content
|
||||
@ -1280,17 +1280,17 @@ class Results
|
||||
* @see getTableHeaders()
|
||||
*
|
||||
* @param FieldMetadata $fieldsMeta set of field properties
|
||||
* @param array $sortExpression sort expression
|
||||
* @param mixed[] $sortExpression sort expression
|
||||
* @param array<int, string> $sortExpressionNoDirection sort expression without direction
|
||||
* @param string $unsortedSqlQuery the unsorted sql query
|
||||
* @param int $sessionMaxRows maximum rows resulted by sql
|
||||
* @param string $comments comment for row
|
||||
* @param array $sortDirection sort direction
|
||||
* @param bool|array $colVisib column is visible(false)
|
||||
* @param mixed[] $sortDirection sort direction
|
||||
* @param bool|mixed[] $colVisib column is visible(false)
|
||||
* or column isn't visible(string array)
|
||||
* @param int|string|null $colVisibElement element of $col_visib array
|
||||
*
|
||||
* @return array 2 element array - $orderLink, $sortedHeaderHtml
|
||||
* @return mixed[] 2 element array - $orderLink, $sortedHeaderHtml
|
||||
* @psalm-return array{
|
||||
* column_name: string,
|
||||
* order_link: string,
|
||||
@ -1386,7 +1386,7 @@ class Results
|
||||
/**
|
||||
* Prepare parameters and html for sorted table header fields
|
||||
*
|
||||
* @param array $sortExpression sort expression
|
||||
* @param mixed[] $sortExpression sort expression
|
||||
* @param array<int, string> $sortExpressionNoDirection sort expression without direction
|
||||
* @param string $sortTable The name of the table to which
|
||||
* the current column belongs to
|
||||
@ -1507,10 +1507,10 @@ class Results
|
||||
*
|
||||
* @see getTableHeaders()
|
||||
*
|
||||
* @param array $sortExpression sort expression
|
||||
* @param array $sortExpressionNoDirection sort expression without direction
|
||||
* @param string $sortTable the table name
|
||||
* @param string $nameToUseInSort the sorting column name
|
||||
* @param mixed[] $sortExpression sort expression
|
||||
* @param mixed[] $sortExpressionNoDirection sort expression without direction
|
||||
* @param string $sortTable the table name
|
||||
* @param string $nameToUseInSort the sorting column name
|
||||
*/
|
||||
private function isInSorted(
|
||||
array $sortExpression,
|
||||
@ -1643,6 +1643,7 @@ class Results
|
||||
);
|
||||
}
|
||||
|
||||
/** @param mixed[] $multipleUrlParams */
|
||||
private function getSortOrderHiddenInputs(
|
||||
array $multipleUrlParams,
|
||||
string $nameToUseInSort,
|
||||
@ -2217,15 +2218,15 @@ class Results
|
||||
*
|
||||
* @see getTableBody()
|
||||
*
|
||||
* @param array $row current row data
|
||||
* @param mixed[] $row current row data
|
||||
* @param int $rowNumber the index of current row
|
||||
* @param array|false $colOrder the column order false when
|
||||
* a property not found false
|
||||
* when a property not found
|
||||
* @param mixed[]|false $colOrder the column order false when
|
||||
* a property not found false
|
||||
* when a property not found
|
||||
* @param array<string, string[]> $map the list of relations
|
||||
* @param bool|array|string $colVisib column is visible(false);
|
||||
* column isn't visible(string
|
||||
* array)
|
||||
* @param bool|mixed[]|string $colVisib column is visible(false);
|
||||
* column isn't visible(string
|
||||
* array)
|
||||
* @param string $urlSqlQuery the analyzed sql query
|
||||
* @psalm-param 'double-click'|'click'|'disabled' $gridEditConfig
|
||||
*
|
||||
@ -2486,7 +2487,7 @@ class Results
|
||||
*
|
||||
* @param array<string,array<int,array<string,string>>|string> $linkRelations
|
||||
* @param string $columnValue column value
|
||||
* @param array $rowInfo information about row
|
||||
* @param mixed[] $rowInfo information about row
|
||||
* @phpstan-param array{
|
||||
* 'link_param': string,
|
||||
* 'link_dependancy_params'?: array<
|
||||
@ -2535,8 +2536,8 @@ class Results
|
||||
/**
|
||||
* Prepare row information for display special links
|
||||
*
|
||||
* @param array $row current row data
|
||||
* @param array|bool $colOrder the column order
|
||||
* @param mixed[] $row current row data
|
||||
* @param mixed[]|bool $colOrder the column order
|
||||
*
|
||||
* @return array<string, mixed> associative array with column nama -> value
|
||||
*/
|
||||
@ -2717,7 +2718,7 @@ class Results
|
||||
* @param string $urlSqlQuery the analyzed sql query
|
||||
* @param int $processId Process ID
|
||||
*
|
||||
* @return array $del_url, $del_str, $js_conf
|
||||
* @return mixed[] $del_url, $del_str, $js_conf
|
||||
* @psalm-return array{?string, ?string, ?string}
|
||||
*/
|
||||
private function getDeleteAndKillLinks(
|
||||
@ -2851,7 +2852,7 @@ class Results
|
||||
* @param bool $conditionField the column should highlighted or not
|
||||
* @param FieldMetadata $meta the meta-information about this field
|
||||
* @param array<string, string[]> $map the list of relations
|
||||
* @param array $transformOptions the transformation parameters
|
||||
* @param mixed[] $transformOptions the transformation parameters
|
||||
*
|
||||
* @return string the prepared cell, html content
|
||||
*/
|
||||
@ -2899,9 +2900,9 @@ class Results
|
||||
* @param string $class the html class for column
|
||||
* @param FieldMetadata $meta the meta-information about this field
|
||||
* @param array<string, string[]> $map the list of relations
|
||||
* @param array $urlParams the parameters for generate url
|
||||
* @param mixed[] $urlParams the parameters for generate url
|
||||
* @param bool $conditionField the column should highlighted or not
|
||||
* @param array $transformOptions the transformation parameters
|
||||
* @param mixed[] $transformOptions the transformation parameters
|
||||
*
|
||||
* @return string the prepared data cell, html content
|
||||
*/
|
||||
@ -3015,9 +3016,9 @@ class Results
|
||||
* @param string $class the html class for column
|
||||
* @param FieldMetadata $meta the meta-information about the field
|
||||
* @param array<string, string[]> $map the list of relations
|
||||
* @param array $urlParams the parameters for generate url
|
||||
* @param mixed[] $urlParams the parameters for generate url
|
||||
* @param bool $conditionField the column should highlighted or not
|
||||
* @param array $transformOptions the transformation parameters
|
||||
* @param mixed[] $transformOptions the transformation parameters
|
||||
*
|
||||
* @return string the prepared data cell, html content
|
||||
*/
|
||||
@ -3929,9 +3930,9 @@ class Results
|
||||
*
|
||||
* @param string $category BLOB|BINARY|GEOMETRY
|
||||
* @param string|null $content the binary content
|
||||
* @param array $transformOptions transformation parameters
|
||||
* @param mixed[] $transformOptions transformation parameters
|
||||
* @param FieldMetadata $meta the meta-information about the field
|
||||
* @param array $urlParams parameters that should go to the download link
|
||||
* @param mixed[] $urlParams parameters that should go to the download link
|
||||
* @param bool $isTruncated the result is truncated or not
|
||||
*/
|
||||
private function handleNonPrintableContents(
|
||||
@ -4070,7 +4071,7 @@ class Results
|
||||
* @param string $displayedData data that will be displayed (maybe be chunked)
|
||||
* @param string $nowrap 'nowrap' if the content should not be wrapped
|
||||
* @param string $whereComparison data for the where clause
|
||||
* @param array $transformOptions options for transformation
|
||||
* @param mixed[] $transformOptions options for transformation
|
||||
* @param bool $isFieldTruncated whether the field is truncated
|
||||
* @param string $originalLength of a truncated column, or ''
|
||||
*
|
||||
@ -4210,7 +4211,7 @@ class Results
|
||||
*
|
||||
* @param string $str string to be truncated
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
* @psalm-return array{bool, string, int}
|
||||
*/
|
||||
private function getPartialText(string $str): array
|
||||
|
||||
@ -62,7 +62,7 @@ class Encoding
|
||||
* - engine contant
|
||||
* - extension name to warn when missing
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private static array $enginemap = [
|
||||
'iconv' => ['iconv', self::ENGINE_ICONV, 'iconv'],
|
||||
@ -74,7 +74,7 @@ class Encoding
|
||||
/**
|
||||
* Order of automatic detection of engines
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
private static array $engineorder = ['iconv', 'mb', 'recode'];
|
||||
|
||||
@ -303,7 +303,7 @@ class Encoding
|
||||
/**
|
||||
* Lists available encodings.
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public static function listEncodings(): array
|
||||
{
|
||||
|
||||
@ -19,7 +19,7 @@ class Bdb extends StorageEngine
|
||||
/**
|
||||
* Returns array with variable names related to this storage engine
|
||||
*
|
||||
* @return array variable names
|
||||
* @return mixed[] variable names
|
||||
*/
|
||||
public function getVariables(): array
|
||||
{
|
||||
|
||||
@ -22,7 +22,7 @@ class Innodb extends StorageEngine
|
||||
/**
|
||||
* Returns array with variable names related to InnoDB storage engine
|
||||
*
|
||||
* @return array variable names
|
||||
* @return mixed[] variable names
|
||||
*/
|
||||
public function getVariables(): array
|
||||
{
|
||||
|
||||
@ -17,7 +17,7 @@ class Memory extends StorageEngine
|
||||
/**
|
||||
* Returns array with variable names dedicated to MEMORY storage engine
|
||||
*
|
||||
* @return array variable names
|
||||
* @return mixed[] variable names
|
||||
*/
|
||||
public function getVariables(): array
|
||||
{
|
||||
|
||||
@ -19,7 +19,7 @@ class Myisam extends StorageEngine
|
||||
/**
|
||||
* Returns array with variable names dedicated to MyISAM storage engine
|
||||
*
|
||||
* @return array variable names
|
||||
* @return mixed[] variable names
|
||||
*/
|
||||
public function getVariables(): array
|
||||
{
|
||||
|
||||
@ -17,7 +17,7 @@ class Ndbcluster extends StorageEngine
|
||||
/**
|
||||
* Returns array with variable names related to NDBCLUSTER storage engine
|
||||
*
|
||||
* @return array variable names
|
||||
* @return mixed[] variable names
|
||||
*/
|
||||
public function getVariables(): array
|
||||
{
|
||||
|
||||
@ -24,7 +24,7 @@ class Pbxt extends StorageEngine
|
||||
/**
|
||||
* Returns array with variable names dedicated to PBXT storage engine
|
||||
*
|
||||
* @return array variable names
|
||||
* @return mixed[] variable names
|
||||
*/
|
||||
public function getVariables(): array
|
||||
{
|
||||
@ -143,7 +143,7 @@ class Pbxt extends StorageEngine
|
||||
*
|
||||
* @param int|string $formattedSize the size expression (for example 8MB)
|
||||
*
|
||||
* @return array|null the formatted value and its unit
|
||||
* @return mixed[]|null the formatted value and its unit
|
||||
*/
|
||||
public function resolveTypeSize(int|string $formattedSize): array|null
|
||||
{
|
||||
|
||||
@ -53,7 +53,7 @@ class Error extends Message
|
||||
/**
|
||||
* Error types
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
public static array $errortype = [
|
||||
0 => 'Internal error',
|
||||
@ -77,7 +77,7 @@ class Error extends Message
|
||||
/**
|
||||
* Error levels
|
||||
*
|
||||
* @var array
|
||||
* @var mixed[]
|
||||
*/
|
||||
public static array $errorlevel = [
|
||||
0 => 'error',
|
||||
@ -110,6 +110,8 @@ class Error extends Message
|
||||
|
||||
/**
|
||||
* Holds the backtrace for this error
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected array $backtrace = [];
|
||||
|
||||
@ -149,9 +151,9 @@ class Error extends Message
|
||||
/**
|
||||
* Process backtrace to avoid path disclosures, objects and so on
|
||||
*
|
||||
* @param array $backtrace backtrace
|
||||
* @param mixed[] $backtrace backtrace
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public static function processBacktrace(array $backtrace): array
|
||||
{
|
||||
@ -205,7 +207,7 @@ class Error extends Message
|
||||
*
|
||||
* We don't store full arguments to avoid wakeup or memory problems.
|
||||
*
|
||||
* @param array $backtrace backtrace
|
||||
* @param mixed[] $backtrace backtrace
|
||||
*/
|
||||
public function setBacktrace(array $backtrace): void
|
||||
{
|
||||
@ -265,7 +267,7 @@ class Error extends Message
|
||||
*
|
||||
* @param int $count Number of stack frames.
|
||||
*
|
||||
* @return array PhpMyAdmin\Error::$_backtrace
|
||||
* @return mixed[] PhpMyAdmin\Error::$_backtrace
|
||||
*/
|
||||
public function getBacktrace(int $count = -1): array
|
||||
{
|
||||
@ -347,7 +349,7 @@ class Error extends Message
|
||||
/**
|
||||
* return formatted backtrace field
|
||||
*
|
||||
* @param array $backtrace Backtrace data
|
||||
* @param mixed[] $backtrace Backtrace data
|
||||
*
|
||||
* @return string formatted backtrace
|
||||
*/
|
||||
@ -375,7 +377,7 @@ class Error extends Message
|
||||
/**
|
||||
* Formats function call in a backtrace
|
||||
*
|
||||
* @param array $step backtrace step
|
||||
* @param mixed[] $step backtrace step
|
||||
*/
|
||||
public static function getFunctionCall(array $step): string
|
||||
{
|
||||
|
||||
@ -55,7 +55,7 @@ class ErrorReport
|
||||
*
|
||||
* @param string $exceptionType whether exception is 'js' or 'php'
|
||||
*
|
||||
* @return array error report if success, Empty Array otherwise
|
||||
* @return mixed[] error report if success, Empty Array otherwise
|
||||
*/
|
||||
public function getData(string $exceptionType = 'js'): array
|
||||
{
|
||||
@ -152,7 +152,7 @@ class ErrorReport
|
||||
*
|
||||
* @param string $url the url to sanitize
|
||||
*
|
||||
* @return array the uri and script name
|
||||
* @return mixed[] the uri and script name
|
||||
*/
|
||||
private function sanitizeUrl(string $url): array
|
||||
{
|
||||
@ -198,7 +198,7 @@ class ErrorReport
|
||||
/**
|
||||
* Sends report data to the error reporting server
|
||||
*
|
||||
* @param array $report the report info to be sent
|
||||
* @param mixed[] $report the report info to be sent
|
||||
*
|
||||
* @return string|bool|null the reply of the server
|
||||
*/
|
||||
@ -217,9 +217,9 @@ class ErrorReport
|
||||
* Translates the cumulative line numbers in the stack trace as well as sanitize
|
||||
* urls and trim long lines in the context
|
||||
*
|
||||
* @param array $stack the stack trace
|
||||
* @param mixed[] $stack the stack trace
|
||||
*
|
||||
* @return array the modified stack trace
|
||||
* @return mixed[] the modified stack trace
|
||||
*/
|
||||
private function translateStacktrace(array $stack): array
|
||||
{
|
||||
|
||||
@ -61,7 +61,7 @@ class Export
|
||||
|
||||
public int $dumpBufferLength = 0;
|
||||
|
||||
/** @var array */
|
||||
/** @var mixed[] */
|
||||
public array $dumpBufferObjects = [];
|
||||
|
||||
public function __construct(private DatabaseInterface $dbi)
|
||||
@ -387,7 +387,7 @@ class Export
|
||||
* @param string $filename the export filename
|
||||
* @param bool $quickExport whether it's a quick export or not
|
||||
*
|
||||
* @return array the full save filename, possible message and the file handle
|
||||
* @return mixed[] the full save filename, possible message and the file handle
|
||||
*/
|
||||
public function openFile(string $filename, bool $quickExport): array
|
||||
{
|
||||
@ -473,9 +473,9 @@ class Export
|
||||
/**
|
||||
* Compress the export buffer
|
||||
*
|
||||
* @param array|string $dumpBuffer the current dump buffer
|
||||
* @param string $compression the compression mode
|
||||
* @param string $filename the filename
|
||||
* @param mixed[]|string $dumpBuffer the current dump buffer
|
||||
* @param string $compression the compression mode
|
||||
* @param string $filename the filename
|
||||
*/
|
||||
public function compress(array|string $dumpBuffer, string $compression, string $filename): array|string|bool
|
||||
{
|
||||
@ -543,17 +543,17 @@ class Export
|
||||
/**
|
||||
* Export at the server level
|
||||
*
|
||||
* @param string|array $dbSelect the selected databases to export
|
||||
* @param string $whatStrucOrData structure or data or both
|
||||
* @param ExportPlugin $exportPlugin the selected export plugin
|
||||
* @param string $errorUrl the URL in case of error
|
||||
* @param string $exportType the export type
|
||||
* @param bool $doRelation whether to export relation info
|
||||
* @param bool $doComments whether to add comments
|
||||
* @param bool $doMime whether to add MIME info
|
||||
* @param bool $doDates whether to add dates
|
||||
* @param array $aliases alias information for db/table/column
|
||||
* @param string $separateFiles whether it is a separate-files export
|
||||
* @param string|mixed[] $dbSelect the selected databases to export
|
||||
* @param string $whatStrucOrData structure or data or both
|
||||
* @param ExportPlugin $exportPlugin the selected export plugin
|
||||
* @param string $errorUrl the URL in case of error
|
||||
* @param string $exportType the export type
|
||||
* @param bool $doRelation whether to export relation info
|
||||
* @param bool $doComments whether to add comments
|
||||
* @param bool $doMime whether to add MIME info
|
||||
* @param bool $doDates whether to add dates
|
||||
* @param mixed[] $aliases alias information for db/table/column
|
||||
* @param string $separateFiles whether it is a separate-files export
|
||||
*/
|
||||
public function exportServer(
|
||||
string|array $dbSelect,
|
||||
@ -608,10 +608,10 @@ class Export
|
||||
* Export at the database level
|
||||
*
|
||||
* @param DatabaseName $db the database to export
|
||||
* @param array $tables the tables to export
|
||||
* @param mixed[] $tables the tables to export
|
||||
* @param string $whatStrucOrData structure or data or both
|
||||
* @param array $tableStructure whether to export structure for each table
|
||||
* @param array $tableData whether to export data for each table
|
||||
* @param mixed[] $tableStructure whether to export structure for each table
|
||||
* @param mixed[] $tableData whether to export data for each table
|
||||
* @param ExportPlugin $exportPlugin the selected export plugin
|
||||
* @param string $errorUrl the URL in case of error
|
||||
* @param string $exportType the export type
|
||||
@ -619,7 +619,7 @@ class Export
|
||||
* @param bool $doComments whether to add comments
|
||||
* @param bool $doMime whether to add MIME info
|
||||
* @param bool $doDates whether to add dates
|
||||
* @param array $aliases Alias information for db/table/column
|
||||
* @param mixed[] $aliases Alias information for db/table/column
|
||||
* @param string $separateFiles whether it is a separate-files export
|
||||
*/
|
||||
public function exportDatabase(
|
||||
@ -924,7 +924,7 @@ class Export
|
||||
* @param string $limitTo upper limit
|
||||
* @param string $limitFrom starting limit
|
||||
* @param string $sqlQuery query for which exporting is requested
|
||||
* @param array $aliases Alias information for db/table/column
|
||||
* @param mixed[] $aliases Alias information for db/table/column
|
||||
*/
|
||||
public function exportTable(
|
||||
string $db,
|
||||
@ -1102,10 +1102,10 @@ class Export
|
||||
* conflicting alias then array2 value is used if it
|
||||
* is non empty otherwise array1 value.
|
||||
*
|
||||
* @param array $aliases1 first array of aliases
|
||||
* @param array $aliases2 second array of aliases
|
||||
* @param mixed[] $aliases1 first array of aliases
|
||||
* @param mixed[] $aliases2 second array of aliases
|
||||
*
|
||||
* @return array resultant merged aliases info
|
||||
* @return mixed[] resultant merged aliases info
|
||||
*/
|
||||
public function mergeAliases(array $aliases1, array $aliases2): array
|
||||
{
|
||||
@ -1159,7 +1159,7 @@ class Export
|
||||
* Locks tables
|
||||
*
|
||||
* @param DatabaseName $db database name
|
||||
* @param array $tables list of table names
|
||||
* @param mixed[] $tables list of table names
|
||||
* @param string $lockType lock type; "[LOW_PRIORITY] WRITE" or "READ [LOCAL]"
|
||||
*
|
||||
* @return mixed result of the query
|
||||
@ -1211,8 +1211,8 @@ class Export
|
||||
/**
|
||||
* Returns the checked clause, depending on the presence of key in array
|
||||
*
|
||||
* @param string $key the key to look for
|
||||
* @param array $array array to verify
|
||||
* @param string $key the key to look for
|
||||
* @param mixed[] $array array to verify
|
||||
*
|
||||
* @return string the checked clause
|
||||
*/
|
||||
@ -1307,6 +1307,7 @@ class Export
|
||||
return $backButton;
|
||||
}
|
||||
|
||||
/** @return mixed[] */
|
||||
private function getPostParams(string $exportType): array
|
||||
{
|
||||
$postParams = $_POST;
|
||||
|
||||
@ -200,7 +200,11 @@ final class FieldMetadata
|
||||
) && $this->charsetnr == 63;
|
||||
}
|
||||
|
||||
/** @see https://dev.mysql.com/doc/connectors/en/apis-php-mysqli.constants.html */
|
||||
/**
|
||||
* @see https://dev.mysql.com/doc/connectors/en/apis-php-mysqli.constants.html
|
||||
*
|
||||
* @return mixed[]
|
||||
*/
|
||||
private function getTypeMap(): array
|
||||
{
|
||||
// Issue #16043 - client API mysqlnd seem not to have MYSQLI_TYPE_JSON defined
|
||||
|
||||
@ -305,11 +305,11 @@ class File
|
||||
* $file['error'] = [value]
|
||||
* </code>
|
||||
*
|
||||
* @param array $file the array
|
||||
* @param string $rownumber number of row to process
|
||||
* @param string $key key to process
|
||||
* @param mixed[] $file the array
|
||||
* @param string $rownumber number of row to process
|
||||
* @param string $key key to process
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function fetchUploadedFromTblChangeRequestMultiple(
|
||||
array $file,
|
||||
|
||||
@ -26,7 +26,7 @@ class FileListing
|
||||
* @param string $dir directory to list
|
||||
* @param string $expression regular expression to match files
|
||||
*
|
||||
* @return array|bool sorted file list on success, false on failure
|
||||
* @return mixed[]|bool sorted file list on success, false on failure
|
||||
*/
|
||||
public function getDirContent(string $dir, string $expression = ''): array|bool
|
||||
{
|
||||
|
||||
@ -12,7 +12,7 @@ final class FlashMessages
|
||||
{
|
||||
private const STORAGE_KEY = 'flashMessages';
|
||||
|
||||
/** @var array */
|
||||
/** @var mixed[] */
|
||||
private array $storage;
|
||||
|
||||
/** @var array<string, string[]> */
|
||||
|
||||
@ -22,7 +22,7 @@ class Font
|
||||
/**
|
||||
* Get list with characters and the corresponding width modifiers.
|
||||
*
|
||||
* @return array with characters and corresponding width modifier
|
||||
* @return mixed[] with characters and corresponding width modifier
|
||||
*/
|
||||
public function getCharLists(): array
|
||||
{
|
||||
@ -92,10 +92,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 int $fontSize size of font
|
||||
* @param array|null $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 int $fontSize size of font
|
||||
* @param mixed[]|null $charLists list of characters and their width modifiers
|
||||
*
|
||||
* @return int width of the text
|
||||
*/
|
||||
|
||||
@ -78,8 +78,8 @@ class Footer
|
||||
/**
|
||||
* Remove recursions and iterator objects from an object
|
||||
*
|
||||
* @param mixed $object Object to clean
|
||||
* @param array $stack Stack used to keep track of recursion, need not be passed for the first time
|
||||
* @param mixed $object Object to clean
|
||||
* @param mixed[] $stack Stack used to keep track of recursion, need not be passed for the first time
|
||||
*
|
||||
* @return mixed Reference passed object
|
||||
*/
|
||||
|
||||
@ -32,10 +32,10 @@ abstract class GisGeometry
|
||||
/**
|
||||
* Prepares and returns the code related to a row in the GIS dataset as SVG.
|
||||
*
|
||||
* @param string $spatial GIS data object
|
||||
* @param string $label label for the GIS data object
|
||||
* @param int[] $color color for the GIS data object
|
||||
* @param array $scaleData data related to scaling
|
||||
* @param string $spatial GIS data object
|
||||
* @param string $label label for the GIS data object
|
||||
* @param int[] $color color for the GIS data object
|
||||
* @param mixed[] $scaleData data related to scaling
|
||||
*
|
||||
* @return string the code related to a row in the GIS dataset
|
||||
*/
|
||||
@ -44,10 +44,10 @@ abstract class GisGeometry
|
||||
/**
|
||||
* Adds to the PNG image object, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*/
|
||||
abstract public function prepareRowAsPng(
|
||||
string $spatial,
|
||||
@ -60,10 +60,10 @@ abstract class GisGeometry
|
||||
/**
|
||||
* Adds to the TCPDF instance, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS data object
|
||||
* @param string $label label for the GIS data object
|
||||
* @param int[] $color color for the GIS data object
|
||||
* @param array $scaleData array containing data related to scaling
|
||||
* @param string $spatial GIS data object
|
||||
* @param string $label label for the GIS data object
|
||||
* @param int[] $color color for the GIS data object
|
||||
* @param mixed[] $scaleData array containing data related to scaling
|
||||
*
|
||||
* @return TCPDF the modified TCPDF instance
|
||||
*/
|
||||
@ -105,7 +105,7 @@ abstract class GisGeometry
|
||||
/**
|
||||
* Generates the WKT with the set of parameters passed by the GIS editor.
|
||||
*
|
||||
* @param array $gisData GIS data
|
||||
* @param mixed[] $gisData GIS data
|
||||
* @param int $index index into the parameter object
|
||||
* @param string|null $empty value for empty points
|
||||
*
|
||||
@ -169,7 +169,7 @@ abstract class GisGeometry
|
||||
*
|
||||
* @param string $wkt Value of the GIS column
|
||||
*
|
||||
* @return array Coordinate params for the GIS data editor from the value of the GIS column
|
||||
* @return mixed[] Coordinate params for the GIS data editor from the value of the GIS column
|
||||
*/
|
||||
abstract protected function getCoordinateParams(string $wkt): array;
|
||||
|
||||
@ -178,7 +178,7 @@ abstract class GisGeometry
|
||||
*
|
||||
* @param string $value Value of the GIS column
|
||||
*
|
||||
* @return array params for the GIS data editor from the value of the GIS column
|
||||
* @return mixed[] params for the GIS data editor from the value of the GIS column
|
||||
*/
|
||||
public function generateParams(string $value): array
|
||||
{
|
||||
@ -193,9 +193,9 @@ abstract class GisGeometry
|
||||
/**
|
||||
* Extracts points, scales and returns them as an array.
|
||||
*
|
||||
* @param string $pointSet string of comma separated points
|
||||
* @param array|null $scaleData data related to scaling
|
||||
* @param bool $linear if true, as a 1D array, else as a 2D array
|
||||
* @param string $pointSet string of comma separated points
|
||||
* @param mixed[]|null $scaleData data related to scaling
|
||||
* @param bool $linear if true, as a 1D array, else as a 2D array
|
||||
*
|
||||
* @return float[]|float[][] scaled points
|
||||
*/
|
||||
@ -239,8 +239,8 @@ abstract class GisGeometry
|
||||
/**
|
||||
* Extracts points, scales and returns them as an array.
|
||||
*
|
||||
* @param string $wktCoords string of comma separated points
|
||||
* @param array|null $scaleData data related to scaling
|
||||
* @param string $wktCoords string of comma separated points
|
||||
* @param mixed[]|null $scaleData data related to scaling
|
||||
*
|
||||
* @return float[][] scaled points
|
||||
*/
|
||||
@ -255,8 +255,8 @@ abstract class GisGeometry
|
||||
/**
|
||||
* Extracts points, scales and returns them as an linear array.
|
||||
*
|
||||
* @param string $wktCoords string of comma separated points
|
||||
* @param array|null $scaleData data related to scaling
|
||||
* @param string $wktCoords string of comma separated points
|
||||
* @param mixed[]|null $scaleData data related to scaling
|
||||
*
|
||||
* @return float[] scaled points
|
||||
*/
|
||||
@ -269,8 +269,8 @@ abstract class GisGeometry
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $wktCoords string of ),( separated points
|
||||
* @param array|null $scaleData data related to scaling
|
||||
* @param string $wktCoords string of ),( separated points
|
||||
* @param mixed[]|null $scaleData data related to scaling
|
||||
*
|
||||
* @return float[][][] scaled points
|
||||
*/
|
||||
@ -284,8 +284,8 @@ abstract class GisGeometry
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $wktCoords string of )),(( separated points
|
||||
* @param array|null $scaleData data related to scaling
|
||||
* @param string $wktCoords string of )),(( separated points
|
||||
* @param mixed[]|null $scaleData data related to scaling
|
||||
*
|
||||
* @return float[][][][] scaled points
|
||||
*/
|
||||
|
||||
@ -84,10 +84,10 @@ class GisGeometryCollection extends GisGeometry
|
||||
/**
|
||||
* Adds to the PNG image object, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*/
|
||||
public function prepareRowAsPng(
|
||||
string $spatial,
|
||||
@ -123,10 +123,10 @@ class GisGeometryCollection extends GisGeometry
|
||||
/**
|
||||
* Adds to the TCPDF instance, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS GEOMETRYCOLLECTION object
|
||||
* @param string $label label for the GIS GEOMETRYCOLLECTION object
|
||||
* @param int[] $color color for the GIS GEOMETRYCOLLECTION object
|
||||
* @param array $scaleData array containing data related to scaling
|
||||
* @param string $spatial GIS GEOMETRYCOLLECTION object
|
||||
* @param string $label label for the GIS GEOMETRYCOLLECTION object
|
||||
* @param int[] $color color for the GIS GEOMETRYCOLLECTION object
|
||||
* @param mixed[] $scaleData array containing data related to scaling
|
||||
*
|
||||
* @return TCPDF the modified TCPDF instance
|
||||
*/
|
||||
@ -159,10 +159,10 @@ class GisGeometryCollection extends GisGeometry
|
||||
/**
|
||||
* Prepares and returns the code related to a row in the GIS dataset as SVG.
|
||||
*
|
||||
* @param string $spatial GIS GEOMETRYCOLLECTION object
|
||||
* @param string $label label for the GIS GEOMETRYCOLLECTION object
|
||||
* @param int[] $color color for the GIS GEOMETRYCOLLECTION object
|
||||
* @param array $scaleData array containing data related to scaling
|
||||
* @param string $spatial GIS GEOMETRYCOLLECTION object
|
||||
* @param string $label label for the GIS GEOMETRYCOLLECTION object
|
||||
* @param int[] $color color for the GIS GEOMETRYCOLLECTION object
|
||||
* @param mixed[] $scaleData array containing data related to scaling
|
||||
*
|
||||
* @return string the code related to a row in the GIS dataset
|
||||
*/
|
||||
@ -266,7 +266,7 @@ class GisGeometryCollection extends GisGeometry
|
||||
/**
|
||||
* Generates the WKT with the set of parameters passed by the GIS editor.
|
||||
*
|
||||
* @param array $gisData GIS data
|
||||
* @param mixed[] $gisData GIS data
|
||||
* @param int $index index into the parameter object
|
||||
* @param string|null $empty value for empty points
|
||||
*
|
||||
@ -297,13 +297,10 @@ class GisGeometryCollection extends GisGeometry
|
||||
return $wkt . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* GeometryCollection does not have coordinates of its own
|
||||
*
|
||||
* @param string $wkt Value of the GIS column
|
||||
*/
|
||||
/** @inheritDoc */
|
||||
protected function getCoordinateParams(string $wkt): array
|
||||
{
|
||||
// GeometryCollection does not have coordinates of its own
|
||||
throw new ErrorException('Has no own coordinates');
|
||||
}
|
||||
|
||||
@ -312,7 +309,7 @@ class GisGeometryCollection extends GisGeometry
|
||||
*
|
||||
* @param string $value of the GIS column
|
||||
*
|
||||
* @return array parameters for the GIS editor from the value of the GIS column
|
||||
* @return mixed[] parameters for the GIS editor from the value of the GIS column
|
||||
*/
|
||||
public function generateParams(string $value): array
|
||||
{
|
||||
|
||||
@ -63,10 +63,10 @@ class GisLineString extends GisGeometry
|
||||
/**
|
||||
* Adds to the PNG image object, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*/
|
||||
public function prepareRowAsPng(
|
||||
string $spatial,
|
||||
@ -115,10 +115,10 @@ class GisLineString extends GisGeometry
|
||||
/**
|
||||
* Adds to the TCPDF instance, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS LINESTRING object
|
||||
* @param string $label Label for the GIS LINESTRING object
|
||||
* @param int[] $color Color for the GIS LINESTRING object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS LINESTRING object
|
||||
* @param string $label Label for the GIS LINESTRING object
|
||||
* @param int[] $color Color for the GIS LINESTRING object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*
|
||||
* @return TCPDF the modified TCPDF instance
|
||||
*/
|
||||
@ -152,10 +152,10 @@ class GisLineString extends GisGeometry
|
||||
/**
|
||||
* Prepares and returns the code related to a row in the GIS dataset as SVG.
|
||||
*
|
||||
* @param string $spatial GIS LINESTRING object
|
||||
* @param string $label Label for the GIS LINESTRING object
|
||||
* @param int[] $color Color for the GIS LINESTRING object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS LINESTRING object
|
||||
* @param string $label Label for the GIS LINESTRING object
|
||||
* @param int[] $color Color for the GIS LINESTRING object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*
|
||||
* @return string the code related to a row in the GIS dataset
|
||||
*/
|
||||
@ -227,7 +227,7 @@ class GisLineString extends GisGeometry
|
||||
/**
|
||||
* Generate the WKT with the set of parameters passed by the GIS editor.
|
||||
*
|
||||
* @param array $gisData GIS data
|
||||
* @param mixed[] $gisData GIS data
|
||||
* @param int $index Index into the parameter object
|
||||
* @param string|null $empty Value for empty points
|
||||
*
|
||||
@ -260,7 +260,7 @@ class GisLineString extends GisGeometry
|
||||
*
|
||||
* @param string $wkt Value of the GIS column
|
||||
*
|
||||
* @return array Coordinate params for the GIS data editor from the value of the GIS column
|
||||
* @return mixed[] Coordinate params for the GIS data editor from the value of the GIS column
|
||||
*/
|
||||
protected function getCoordinateParams(string $wkt): array
|
||||
{
|
||||
|
||||
@ -72,10 +72,10 @@ class GisMultiLineString extends GisGeometry
|
||||
/**
|
||||
* Adds to the PNG image object, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*/
|
||||
public function prepareRowAsPng(
|
||||
string $spatial,
|
||||
@ -132,10 +132,10 @@ class GisMultiLineString extends GisGeometry
|
||||
/**
|
||||
* Adds to the TCPDF instance, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS MULTILINESTRING object
|
||||
* @param string $label Label for the GIS MULTILINESTRING object
|
||||
* @param int[] $color Color for the GIS MULTILINESTRING object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS MULTILINESTRING object
|
||||
* @param string $label Label for the GIS MULTILINESTRING object
|
||||
* @param int[] $color Color for the GIS MULTILINESTRING object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*
|
||||
* @return TCPDF the modified TCPDF instance
|
||||
*/
|
||||
@ -177,10 +177,10 @@ class GisMultiLineString extends GisGeometry
|
||||
/**
|
||||
* Prepares and returns the code related to a row in the GIS dataset as SVG.
|
||||
*
|
||||
* @param string $spatial GIS MULTILINESTRING object
|
||||
* @param string $label Label for the GIS MULTILINESTRING object
|
||||
* @param int[] $color Color for the GIS MULTILINESTRING object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS MULTILINESTRING object
|
||||
* @param string $label Label for the GIS MULTILINESTRING object
|
||||
* @param int[] $color Color for the GIS MULTILINESTRING object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*
|
||||
* @return string the code related to a row in the GIS dataset
|
||||
*/
|
||||
@ -258,7 +258,7 @@ class GisMultiLineString extends GisGeometry
|
||||
/**
|
||||
* Generate the WKT with the set of parameters passed by the GIS editor.
|
||||
*
|
||||
* @param array $gisData GIS data
|
||||
* @param mixed[] $gisData GIS data
|
||||
* @param int $index Index into the parameter object
|
||||
* @param string|null $empty Value for empty points
|
||||
*
|
||||
@ -302,7 +302,7 @@ class GisMultiLineString extends GisGeometry
|
||||
/**
|
||||
* Generate the WKT for the data from ESRI shape files.
|
||||
*
|
||||
* @param array $rowData GIS data
|
||||
* @param mixed[] $rowData GIS data
|
||||
*
|
||||
* @return string the WKT for the data from ESRI shape files
|
||||
*/
|
||||
@ -329,7 +329,7 @@ class GisMultiLineString extends GisGeometry
|
||||
*
|
||||
* @param string $wkt Value of the GIS column
|
||||
*
|
||||
* @return array Coordinate params for the GIS data editor from the value of the GIS column
|
||||
* @return mixed[] Coordinate params for the GIS data editor from the value of the GIS column
|
||||
*/
|
||||
protected function getCoordinateParams(string $wkt): array
|
||||
{
|
||||
|
||||
@ -63,10 +63,10 @@ class GisMultiPoint extends GisGeometry
|
||||
/**
|
||||
* Adds to the PNG image object, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*/
|
||||
public function prepareRowAsPng(
|
||||
string $spatial,
|
||||
@ -117,10 +117,10 @@ class GisMultiPoint extends GisGeometry
|
||||
/**
|
||||
* Adds to the TCPDF instance, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS MULTIPOINT object
|
||||
* @param string $label Label for the GIS MULTIPOINT object
|
||||
* @param int[] $color Color for the GIS MULTIPOINT object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS MULTIPOINT object
|
||||
* @param string $label Label for the GIS MULTIPOINT object
|
||||
* @param int[] $color Color for the GIS MULTIPOINT object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*
|
||||
* @return TCPDF the modified TCPDF instance
|
||||
*/
|
||||
@ -159,10 +159,10 @@ class GisMultiPoint extends GisGeometry
|
||||
/**
|
||||
* Prepares and returns the code related to a row in the GIS dataset as SVG.
|
||||
*
|
||||
* @param string $spatial GIS MULTIPOINT object
|
||||
* @param string $label Label for the GIS MULTIPOINT object
|
||||
* @param int[] $color Color for the GIS MULTIPOINT object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS MULTIPOINT object
|
||||
* @param string $label Label for the GIS MULTIPOINT object
|
||||
* @param int[] $color Color for the GIS MULTIPOINT object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*
|
||||
* @return string the code related to a row in the GIS dataset
|
||||
*/
|
||||
@ -245,7 +245,7 @@ class GisMultiPoint extends GisGeometry
|
||||
/**
|
||||
* Generate the WKT with the set of parameters passed by the GIS editor.
|
||||
*
|
||||
* @param array $gisData GIS data
|
||||
* @param mixed[] $gisData GIS data
|
||||
* @param int $index Index into the parameter object
|
||||
* @param string|null $empty Multipoint does not adhere to this
|
||||
*
|
||||
@ -276,7 +276,7 @@ class GisMultiPoint extends GisGeometry
|
||||
/**
|
||||
* Generate the WKT for the data from ESRI shape files.
|
||||
*
|
||||
* @param array $rowData GIS data
|
||||
* @param mixed[] $rowData GIS data
|
||||
*
|
||||
* @return string the WKT for the data from ESRI shape files
|
||||
*/
|
||||
@ -298,7 +298,7 @@ class GisMultiPoint extends GisGeometry
|
||||
*
|
||||
* @param string $wkt Value of the GIS column
|
||||
*
|
||||
* @return array Coordinate params for the GIS data editor from the value of the GIS column
|
||||
* @return mixed[] Coordinate params for the GIS data editor from the value of the GIS column
|
||||
*/
|
||||
protected function getCoordinateParams(string $wkt): array
|
||||
{
|
||||
|
||||
@ -74,10 +74,10 @@ class GisMultiPolygon extends GisGeometry
|
||||
/**
|
||||
* Adds to the PNG image object, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*/
|
||||
public function prepareRowAsPng(
|
||||
string $spatial,
|
||||
@ -132,10 +132,10 @@ class GisMultiPolygon extends GisGeometry
|
||||
/**
|
||||
* Adds to the TCPDF instance, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS MULTIPOLYGON object
|
||||
* @param string $label Label for the GIS MULTIPOLYGON object
|
||||
* @param int[] $color Color for the GIS MULTIPOLYGON object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS MULTIPOLYGON object
|
||||
* @param string $label Label for the GIS MULTIPOLYGON object
|
||||
* @param int[] $color Color for the GIS MULTIPOLYGON object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*
|
||||
* @return TCPDF the modified TCPDF instance
|
||||
*/
|
||||
@ -178,10 +178,10 @@ class GisMultiPolygon extends GisGeometry
|
||||
/**
|
||||
* Prepares and returns the code related to a row in the GIS dataset as SVG.
|
||||
*
|
||||
* @param string $spatial GIS MULTIPOLYGON object
|
||||
* @param string $label Label for the GIS MULTIPOLYGON object
|
||||
* @param int[] $color Color for the GIS MULTIPOLYGON object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS MULTIPOLYGON object
|
||||
* @param string $label Label for the GIS MULTIPOLYGON object
|
||||
* @param int[] $color Color for the GIS MULTIPOLYGON object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*
|
||||
* @return string the code related to a row in the GIS dataset
|
||||
*/
|
||||
@ -264,8 +264,8 @@ class GisMultiPolygon extends GisGeometry
|
||||
/**
|
||||
* Draws a ring of the polygon using SVG path element.
|
||||
*
|
||||
* @param string $polygon The ring
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $polygon The ring
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*
|
||||
* @return string the code to draw the ring
|
||||
*/
|
||||
@ -287,7 +287,7 @@ class GisMultiPolygon extends GisGeometry
|
||||
/**
|
||||
* Generate the WKT with the set of parameters passed by the GIS editor.
|
||||
*
|
||||
* @param array $gisData GIS data
|
||||
* @param mixed[] $gisData GIS data
|
||||
* @param int $index Index into the parameter object
|
||||
* @param string|null $empty Value for empty points
|
||||
*
|
||||
@ -342,7 +342,7 @@ class GisMultiPolygon extends GisGeometry
|
||||
/**
|
||||
* Generate the WKT for the data from ESRI shape files.
|
||||
*
|
||||
* @param array $rowData GIS data
|
||||
* @param mixed[] $rowData GIS data
|
||||
*
|
||||
* @return string the WKT for the data from ESRI shape files
|
||||
*/
|
||||
@ -432,7 +432,7 @@ class GisMultiPolygon extends GisGeometry
|
||||
*
|
||||
* @param string $wkt Value of the GIS column
|
||||
*
|
||||
* @return array Coordinate params for the GIS data editor from the value of the GIS column
|
||||
* @return mixed[] Coordinate params for the GIS data editor from the value of the GIS column
|
||||
*/
|
||||
protected function getCoordinateParams(string $wkt): array
|
||||
{
|
||||
|
||||
@ -62,10 +62,10 @@ class GisPoint extends GisGeometry
|
||||
/**
|
||||
* Adds to the PNG image object, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*/
|
||||
public function prepareRowAsPng(
|
||||
string $spatial,
|
||||
@ -111,10 +111,10 @@ class GisPoint extends GisGeometry
|
||||
/**
|
||||
* Adds to the TCPDF instance, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS POINT object
|
||||
* @param string $label Label for the GIS POINT object
|
||||
* @param int[] $color Color for the GIS POINT object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS POINT object
|
||||
* @param string $label Label for the GIS POINT object
|
||||
* @param int[] $color Color for the GIS POINT object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*
|
||||
* @return TCPDF the modified TCPDF instance
|
||||
*/
|
||||
@ -148,10 +148,10 @@ class GisPoint extends GisGeometry
|
||||
/**
|
||||
* Prepares and returns the code related to a row in the GIS dataset as SVG.
|
||||
*
|
||||
* @param string $spatial GIS POINT object
|
||||
* @param string $label Label for the GIS POINT object
|
||||
* @param int[] $color Color for the GIS POINT object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS POINT object
|
||||
* @param string $label Label for the GIS POINT object
|
||||
* @param int[] $color Color for the GIS POINT object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*
|
||||
* @return string the code related to a row in the GIS dataset
|
||||
*/
|
||||
@ -230,7 +230,7 @@ class GisPoint extends GisGeometry
|
||||
/**
|
||||
* Generate the WKT with the set of parameters passed by the GIS editor.
|
||||
*
|
||||
* @param array $gisData GIS data
|
||||
* @param mixed[] $gisData GIS data
|
||||
* @param int $index Index into the parameter object
|
||||
* @param string|null $empty Point does not adhere to this parameter
|
||||
*
|
||||
@ -251,7 +251,7 @@ class GisPoint extends GisGeometry
|
||||
/**
|
||||
* Generate the WKT for the data from ESRI shape files.
|
||||
*
|
||||
* @param array $rowData GIS data
|
||||
* @param mixed[] $rowData GIS data
|
||||
*
|
||||
* @return string the WKT for the data from ESRI shape files
|
||||
*/
|
||||
@ -266,7 +266,7 @@ class GisPoint extends GisGeometry
|
||||
*
|
||||
* @param string $wkt Value of the GIS column
|
||||
*
|
||||
* @return array Coordinate params for the GIS data editor from the value of the GIS column
|
||||
* @return mixed[] Coordinate params for the GIS data editor from the value of the GIS column
|
||||
*/
|
||||
protected function getCoordinateParams(string $wkt): array
|
||||
{
|
||||
|
||||
@ -70,10 +70,10 @@ class GisPolygon extends GisGeometry
|
||||
/**
|
||||
* Adds to the PNG image object, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*/
|
||||
public function prepareRowAsPng(
|
||||
string $spatial,
|
||||
@ -115,10 +115,10 @@ class GisPolygon extends GisGeometry
|
||||
/**
|
||||
* Adds to the TCPDF instance, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*
|
||||
* @return TCPDF the modified TCPDF instance
|
||||
*/
|
||||
@ -151,10 +151,10 @@ class GisPolygon extends GisGeometry
|
||||
/**
|
||||
* Prepares and returns the code related to a row in the GIS dataset as SVG.
|
||||
*
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label Label for the GIS POLYGON object
|
||||
* @param int[] $color Color for the GIS POLYGON object
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*
|
||||
* @return string the code related to a row in the GIS dataset
|
||||
*/
|
||||
@ -231,8 +231,8 @@ class GisPolygon extends GisGeometry
|
||||
/**
|
||||
* Draws a ring of the polygon using SVG path element.
|
||||
*
|
||||
* @param string $polygon The ring
|
||||
* @param array $scaleData Array containing data related to scaling
|
||||
* @param string $polygon The ring
|
||||
* @param mixed[] $scaleData Array containing data related to scaling
|
||||
*
|
||||
* @return string the code to draw the ring
|
||||
*/
|
||||
@ -254,7 +254,7 @@ class GisPolygon extends GisGeometry
|
||||
/**
|
||||
* Generate the WKT with the set of parameters passed by the GIS editor.
|
||||
*
|
||||
* @param array $gisData GIS data
|
||||
* @param mixed[] $gisData GIS data
|
||||
* @param int $index Index into the parameter object
|
||||
* @param string|null $empty Value for empty points
|
||||
*
|
||||
@ -296,7 +296,7 @@ class GisPolygon extends GisGeometry
|
||||
/**
|
||||
* Calculates the area of a closed simple polygon.
|
||||
*
|
||||
* @param array $ring array of points forming the ring
|
||||
* @param mixed[] $ring array of points forming the ring
|
||||
*
|
||||
* @return float the area of a closed simple polygon
|
||||
*/
|
||||
@ -330,7 +330,7 @@ class GisPolygon extends GisGeometry
|
||||
* Determines whether a set of points represents an outer ring.
|
||||
* If points are in clockwise orientation then, they form an outer ring.
|
||||
*
|
||||
* @param array $ring array of points forming the ring
|
||||
* @param mixed[] $ring array of points forming the ring
|
||||
*/
|
||||
public static function isOuterRing(array $ring): bool
|
||||
{
|
||||
@ -342,8 +342,8 @@ class GisPolygon extends GisGeometry
|
||||
/**
|
||||
* Determines whether a given point is inside a given polygon.
|
||||
*
|
||||
* @param array $point x, y coordinates of the point
|
||||
* @param array $polygon array of points forming the ring
|
||||
* @param mixed[] $point x, y coordinates of the point
|
||||
* @param mixed[] $polygon array of points forming the ring
|
||||
*/
|
||||
public static function isPointInsidePolygon(array $point, array $polygon): bool
|
||||
{
|
||||
@ -394,9 +394,9 @@ class GisPolygon extends GisGeometry
|
||||
* Returns a point that is guaranteed to be on the surface of the ring.
|
||||
* (for simple closed rings)
|
||||
*
|
||||
* @param array $ring array of points forming the ring
|
||||
* @param mixed[] $ring array of points forming the ring
|
||||
*
|
||||
* @return array|false a point on the surface of the ring
|
||||
* @return mixed[]|false a point on the surface of the ring
|
||||
*/
|
||||
public static function getPointOnSurface(array $ring): array|false
|
||||
{
|
||||
@ -462,7 +462,7 @@ class GisPolygon extends GisGeometry
|
||||
*
|
||||
* @param string $wkt Value of the GIS column
|
||||
*
|
||||
* @return array Coordinate params for the GIS data editor from the value of the GIS column
|
||||
* @return mixed[] Coordinate params for the GIS data editor from the value of the GIS column
|
||||
*/
|
||||
protected function getCoordinateParams(string $wkt): array
|
||||
{
|
||||
|
||||
@ -481,7 +481,7 @@ class GisVisualization
|
||||
*
|
||||
* @param mixed[][] $data Row data
|
||||
*
|
||||
* @return array an array containing the scale, x and y offsets
|
||||
* @return mixed[] an array containing the scale, x and y offsets
|
||||
*/
|
||||
private function scaleDataSet(array $data): array
|
||||
{
|
||||
@ -540,7 +540,7 @@ class GisVisualization
|
||||
* Prepares and return the dataset as needed by the visualization.
|
||||
*
|
||||
* @param mixed[][] $data Raw data
|
||||
* @param array $scaleData Data related to scaling
|
||||
* @param mixed[] $scaleData Data related to scaling
|
||||
* @param string $format Format of the visualization
|
||||
* @param ImageWrapper|TCPDF|string $results Image object in the case of png
|
||||
* TCPDF object in the case of pdf
|
||||
|
||||
@ -358,7 +358,7 @@ class Git
|
||||
/**
|
||||
* Extract committer, author and message from commit body
|
||||
*
|
||||
* @param array $commit The commit body
|
||||
* @param mixed[] $commit The commit body
|
||||
*
|
||||
* @return array<int,array<string,string>|string>
|
||||
*/
|
||||
@ -440,6 +440,7 @@ class Git
|
||||
return null;
|
||||
}
|
||||
|
||||
/** @return mixed[] */
|
||||
private function getHashFromHeadRef(string $gitFolder, string $refHead): array
|
||||
{
|
||||
// are we on any branch?
|
||||
|
||||
@ -132,7 +132,7 @@ class Header
|
||||
* Returns, as an array, a list of parameters
|
||||
* used on the client side
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getJsParams(): array
|
||||
{
|
||||
|
||||
@ -259,9 +259,9 @@ class Generator
|
||||
/**
|
||||
* Returns default function for a particular column.
|
||||
*
|
||||
* @param array $field Data about the column for which
|
||||
* @param mixed[] $field Data about the column for which
|
||||
* to generate the dropdown
|
||||
* @param bool $insertMode Whether the operation is 'insert'
|
||||
* @param bool $insertMode Whether the operation is 'insert'
|
||||
*
|
||||
* @return string An HTML snippet of a dropdown list with function
|
||||
* names appropriate for the requested column.
|
||||
@ -327,9 +327,9 @@ class Generator
|
||||
/**
|
||||
* Creates a dropdown box with MySQL functions for a particular column.
|
||||
*
|
||||
* @param array $field Data about the column for which to generate the dropdown
|
||||
* @param bool $insertMode Whether the operation is 'insert'
|
||||
* @param array $foreignData Foreign data
|
||||
* @param mixed[] $field Data about the column for which to generate the dropdown
|
||||
* @param bool $insertMode Whether the operation is 'insert'
|
||||
* @param mixed[] $foreignData Foreign data
|
||||
*
|
||||
* @return string An HTML snippet of a dropdown list with function names appropriate for the requested column.
|
||||
*/
|
||||
@ -894,10 +894,10 @@ class Generator
|
||||
*
|
||||
* The image name should match CSS class defined in icons.css.php
|
||||
*
|
||||
* @param string $image The name of the file to get
|
||||
* @param string $alternate Used to set 'alt' and 'title' attributes
|
||||
* of the image
|
||||
* @param array $attributes An associative array of other attributes
|
||||
* @param string $image The name of the file to get
|
||||
* @param string $alternate Used to set 'alt' and 'title' attributes
|
||||
* of the image
|
||||
* @param mixed[] $attributes An associative array of other attributes
|
||||
*
|
||||
* @return string an html IMG tag
|
||||
*/
|
||||
@ -1035,7 +1035,7 @@ class Generator
|
||||
*
|
||||
* @param int $count number of elements in the list
|
||||
* @param int $pos current position in the list
|
||||
* @param array $urlParams url parameters
|
||||
* @param mixed[] $urlParams url parameters
|
||||
* @param string $script script name for form target
|
||||
* @param string $frame target frame
|
||||
* @param int $maxCount maximum number of elements to display from
|
||||
|
||||
@ -283,7 +283,7 @@ class Import
|
||||
* @param string|null $db current db
|
||||
* @param bool|null $reload reload
|
||||
*
|
||||
* @return array (current or new db, whether to reload)
|
||||
* @return mixed[] (current or new db, whether to reload)
|
||||
*/
|
||||
public function lookForUse(string|null $buffer, string|null $db, bool|null $reload): array
|
||||
{
|
||||
@ -541,7 +541,7 @@ class Import
|
||||
*
|
||||
* @param string $cell cell content
|
||||
*
|
||||
* @return array Contains the precision, scale, and full size
|
||||
* @return mixed[] Contains the precision, scale, and full size
|
||||
* representation of the given decimal cell
|
||||
*/
|
||||
public function getDecimalSize(string $cell): array
|
||||
@ -836,9 +836,9 @@ class Import
|
||||
*
|
||||
* @link https://wiki.phpmyadmin.net/pma/Import
|
||||
*
|
||||
* @param array $table array(string $table_name, array $col_names, array $rows)
|
||||
* @param mixed[] $table array(string $table_name, array $col_names, array $rows)
|
||||
*
|
||||
* @return array|bool array(array $types, array $sizes)
|
||||
* @return mixed[]|bool array(array $types, array $sizes)
|
||||
*
|
||||
* @todo Handle the error case more elegantly
|
||||
*/
|
||||
@ -931,12 +931,12 @@ class Import
|
||||
*
|
||||
* @link https://wiki.phpmyadmin.net/pma/Import
|
||||
*
|
||||
* @param string $dbName 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 $additionalSql Additional SQL statements to be executed
|
||||
* @param array|null $options Associative array of options
|
||||
* @param string[] $sqlData List of SQL statements to be executed
|
||||
* @param string $dbName Name of the database
|
||||
* @param mixed[] $tables Array of tables for the specified database
|
||||
* @param mixed[]|null $analyses Analyses of the tables
|
||||
* @param mixed[]|null $additionalSql Additional SQL statements to be executed
|
||||
* @param mixed[]|null $options Associative array of options
|
||||
* @param string[] $sqlData List of SQL statements to be executed
|
||||
*/
|
||||
public function buildSql(
|
||||
string $dbName,
|
||||
@ -1429,7 +1429,7 @@ class Import
|
||||
return $compressions;
|
||||
}
|
||||
|
||||
/** @param array $importList List of plugin instances. */
|
||||
/** @param mixed[] $importList List of plugin instances. */
|
||||
public static function getLocalFiles(array $importList): false|string
|
||||
{
|
||||
$fileListing = new FileListing();
|
||||
|
||||
@ -22,6 +22,8 @@ final class Ajax
|
||||
{
|
||||
/**
|
||||
* Sets up some variables for upload progress
|
||||
*
|
||||
* @return mixed[]
|
||||
*/
|
||||
public static function uploadProgressSetup(): array
|
||||
{
|
||||
|
||||
@ -83,7 +83,7 @@ class Index
|
||||
*/
|
||||
private string $parser = '';
|
||||
|
||||
/** @param array $params parameters */
|
||||
/** @param mixed[] $params parameters */
|
||||
public function __construct(array $params = [])
|
||||
{
|
||||
$this->set($params);
|
||||
@ -225,7 +225,7 @@ class Index
|
||||
/**
|
||||
* Adds a list of columns to the index
|
||||
*
|
||||
* @param array $columns array containing details about the columns
|
||||
* @param mixed[] $columns array containing details about the columns
|
||||
*/
|
||||
public function addColumns(array $columns): void
|
||||
{
|
||||
@ -265,7 +265,7 @@ class Index
|
||||
/**
|
||||
* Sets index details
|
||||
*
|
||||
* @param array $params index details
|
||||
* @param mixed[] $params index details
|
||||
*/
|
||||
public function set(array $params): void
|
||||
{
|
||||
|
||||
@ -46,7 +46,7 @@ class IndexColumn
|
||||
*/
|
||||
private string|null $expression = null;
|
||||
|
||||
/** @param array $params an array containing the parameters of the index column */
|
||||
/** @param mixed[] $params an array containing the parameters of the index column */
|
||||
public function __construct(array $params = [])
|
||||
{
|
||||
$this->set($params);
|
||||
@ -71,7 +71,7 @@ class IndexColumn
|
||||
/**
|
||||
* Sets parameters of the index column
|
||||
*
|
||||
* @param array $params an array containing the parameters of the index column
|
||||
* @param mixed[] $params an array containing the parameters of the index column
|
||||
*/
|
||||
public function set(array $params): void
|
||||
{
|
||||
|
||||
@ -90,9 +90,9 @@ class InsertEdit
|
||||
/**
|
||||
* Retrieve form parameters for insert/edit form
|
||||
*
|
||||
* @param string $db name of the database
|
||||
* @param string $table name of the table
|
||||
* @param array $whereClauseArray
|
||||
* @param string $db name of the database
|
||||
* @param string $table name of the table
|
||||
* @param mixed[] $whereClauseArray
|
||||
*
|
||||
* @return array<string, string> array of insert/edit form parameters
|
||||
*/
|
||||
@ -200,9 +200,9 @@ class InsertEdit
|
||||
/**
|
||||
* Show message for empty result or set the unique_condition
|
||||
*
|
||||
* @param array $rows MySQL returned rows
|
||||
* @param mixed[] $rows MySQL returned rows
|
||||
* @param string|int $keyId ID in current key
|
||||
* @param array $whereClauseArray array of where clauses
|
||||
* @param mixed[] $whereClauseArray array of where clauses
|
||||
* @param string $localQuery query performed
|
||||
* @param ResultInterface[] $result MySQL result handle
|
||||
*/
|
||||
@ -266,10 +266,10 @@ class InsertEdit
|
||||
/**
|
||||
* Add some url parameters
|
||||
*
|
||||
* @param array $urlParams containing $db and $table as url parameters
|
||||
* @param array $whereClauseArray where clauses array
|
||||
* @param mixed[] $urlParams containing $db and $table as url parameters
|
||||
* @param mixed[] $whereClauseArray where clauses array
|
||||
*
|
||||
* @return array Add some url parameters to $url_params array and return it
|
||||
* @return mixed[] Add some url parameters to $url_params array and return it
|
||||
*/
|
||||
public function urlParamsInEditMode(
|
||||
array $urlParams,
|
||||
@ -289,9 +289,9 @@ class InsertEdit
|
||||
/**
|
||||
* Show type information or function selectors in Insert/Edit
|
||||
*
|
||||
* @param string $which function|type
|
||||
* @param array $urlParams containing url parameters
|
||||
* @param bool $isShow whether to show the element in $which
|
||||
* @param string $which function|type
|
||||
* @param mixed[] $urlParams containing url parameters
|
||||
* @param bool $isShow whether to show the element in $which
|
||||
*
|
||||
* @return string an HTML snippet
|
||||
*/
|
||||
@ -346,11 +346,11 @@ class InsertEdit
|
||||
/**
|
||||
* Analyze the table column array
|
||||
*
|
||||
* @param array $column description of column in given table
|
||||
* @param array $commentsMap comments for every column that has a comment
|
||||
* @param bool $timestampSeen whether a timestamp has been seen
|
||||
* @param mixed[] $column description of column in given table
|
||||
* @param mixed[] $commentsMap comments for every column that has a comment
|
||||
* @param bool $timestampSeen whether a timestamp has been seen
|
||||
*
|
||||
* @return array description of column in given table
|
||||
* @return mixed[] description of column in given table
|
||||
*/
|
||||
private function analyzeTableColumnsArray(
|
||||
array $column,
|
||||
@ -387,8 +387,8 @@ class InsertEdit
|
||||
/**
|
||||
* Retrieve the column title
|
||||
*
|
||||
* @param array $column description of column in given table
|
||||
* @param array $commentsMap comments for every column that has a comment
|
||||
* @param mixed[] $column description of column in given table
|
||||
* @param mixed[] $commentsMap comments for every column that has a comment
|
||||
*
|
||||
* @return string column title
|
||||
*/
|
||||
@ -408,7 +408,7 @@ class InsertEdit
|
||||
* the goal is to ensure that types such as "enum('one','two','binary',..)"
|
||||
* or "enum('one','two','varbinary',..)" are not categorized as binary
|
||||
*
|
||||
* @param array $column description of column in given table
|
||||
* @param mixed[] $column description of column in given table
|
||||
* @param string[] $types the types to verify
|
||||
*/
|
||||
public function isColumn(array $column, array $types): bool
|
||||
@ -425,10 +425,10 @@ class InsertEdit
|
||||
/**
|
||||
* Retrieve set, enum, timestamp table columns
|
||||
*
|
||||
* @param array $column description of column in given table
|
||||
* @param bool $timestampSeen whether a timestamp has been seen
|
||||
* @param mixed[] $column description of column in given table
|
||||
* @param bool $timestampSeen whether a timestamp has been seen
|
||||
*
|
||||
* @return array $column['pma_type'], $column['wrap'], $column['first_timestamp']
|
||||
* @return mixed[] $column['pma_type'], $column['wrap'], $column['first_timestamp']
|
||||
* @psalm-return array{0: mixed, 1: string, 2: bool}
|
||||
*/
|
||||
private function getEnumSetAndTimestampColumns(array $column, bool $timestampSeen): array
|
||||
@ -448,9 +448,9 @@ class InsertEdit
|
||||
/**
|
||||
* Retrieve the nullify code for the null column
|
||||
*
|
||||
* @param array $column description of column in given table
|
||||
* @param array $foreigners keys into foreign fields
|
||||
* @param array $foreignData data about the foreign keys
|
||||
* @param mixed[] $column description of column in given table
|
||||
* @param mixed[] $foreigners keys into foreign fields
|
||||
* @param mixed[] $foreignData data about the foreign keys
|
||||
*/
|
||||
private function getNullifyCodeForNullColumn(
|
||||
array $column,
|
||||
@ -482,17 +482,17 @@ class InsertEdit
|
||||
/**
|
||||
* Get HTML textarea for insert form
|
||||
*
|
||||
* @param array $column column information
|
||||
* @param string $backupField hidden input field
|
||||
* @param string $columnNameAppendix the name attribute
|
||||
* @param string $onChangeClause onchange clause for fields
|
||||
* @param int $tabindex tab index
|
||||
* @param int $tabindexForValue offset for the values tabindex
|
||||
* @param int $idindex id index
|
||||
* @param string $textDir text direction
|
||||
* @param string $specialCharsEncoded replaced char if the string starts
|
||||
* with a \r\n pair (0x0d0a) add an extra \n
|
||||
* @param string $dataType the html5 data-* attribute type
|
||||
* @param mixed[] $column column information
|
||||
* @param string $backupField hidden input field
|
||||
* @param string $columnNameAppendix the name attribute
|
||||
* @param string $onChangeClause onchange clause for fields
|
||||
* @param int $tabindex tab index
|
||||
* @param int $tabindexForValue offset for the values tabindex
|
||||
* @param int $idindex id index
|
||||
* @param string $textDir text direction
|
||||
* @param string $specialCharsEncoded replaced char if the string starts
|
||||
* with a \r\n pair (0x0d0a) add an extra \n
|
||||
* @param string $dataType the html5 data-* attribute type
|
||||
*
|
||||
* @return string an html snippet
|
||||
*/
|
||||
@ -547,7 +547,7 @@ class InsertEdit
|
||||
*
|
||||
* @param string[] $enumSetValues
|
||||
*
|
||||
* @return array column values as an associative array
|
||||
* @return mixed[] column values as an associative array
|
||||
* @psalm-return list<array{html: string, plain: string}>
|
||||
*/
|
||||
private function getColumnEnumValues(array $enumSetValues): array
|
||||
@ -563,10 +563,10 @@ class InsertEdit
|
||||
/**
|
||||
* Retrieve column 'set' value and select size
|
||||
*
|
||||
* @param array $column description of column in given table
|
||||
* @param mixed[] $column description of column in given table
|
||||
* @param string[] $enumSetValues
|
||||
*
|
||||
* @return array $column['values'], $column['select_size']
|
||||
* @return mixed[] $column['values'], $column['select_size']
|
||||
*/
|
||||
private function getColumnSetValueAndSelectSize(
|
||||
array $column,
|
||||
@ -587,15 +587,15 @@ class InsertEdit
|
||||
/**
|
||||
* Get HTML input type
|
||||
*
|
||||
* @param array $column description of column in given table
|
||||
* @param string $columnNameAppendix the name attribute
|
||||
* @param string $specialChars special characters
|
||||
* @param int $fieldsize html field size
|
||||
* @param string $onChangeClause onchange clause for fields
|
||||
* @param int $tabindex tab index
|
||||
* @param int $tabindexForValue offset for the values tabindex
|
||||
* @param int $idindex id index
|
||||
* @param string $dataType the html5 data-* attribute type
|
||||
* @param mixed[] $column description of column in given table
|
||||
* @param string $columnNameAppendix the name attribute
|
||||
* @param string $specialChars special characters
|
||||
* @param int $fieldsize html field size
|
||||
* @param string $onChangeClause onchange clause for fields
|
||||
* @param int $tabindex tab index
|
||||
* @param int $tabindexForValue offset for the values tabindex
|
||||
* @param int $idindex id index
|
||||
* @param string $dataType the html5 data-* attribute type
|
||||
*
|
||||
* @return string an html snippet
|
||||
*/
|
||||
@ -686,7 +686,7 @@ class InsertEdit
|
||||
* @param string $pmaType column type
|
||||
* @param int $biggestMaxFileSize biggest max file size for uploading
|
||||
*
|
||||
* @return array an html snippet and $biggest_max_file_size
|
||||
* @return mixed[] an html snippet and $biggest_max_file_size
|
||||
* @psalm-return array{non-empty-string, int}
|
||||
*/
|
||||
private function getMaxUploadSize(string $pmaType, int $biggestMaxFileSize): array
|
||||
@ -722,23 +722,23 @@ class InsertEdit
|
||||
* Get HTML for the Value column of other datatypes
|
||||
* (here, "column" is used in the sense of HTML column in HTML table)
|
||||
*
|
||||
* @param array $column description of column in given table
|
||||
* @param string $defaultCharEditing default char editing mode which is stored
|
||||
* in the config.inc.php script
|
||||
* @param string $backupField hidden input field
|
||||
* @param string $columnNameAppendix the name attribute
|
||||
* @param string $onChangeClause onchange clause for fields
|
||||
* @param int $tabindex tab index
|
||||
* @param string $specialChars special characters
|
||||
* @param int $tabindexForValue offset for the values tabindex
|
||||
* @param int $idindex id index
|
||||
* @param string $textDir text direction
|
||||
* @param string $specialCharsEncoded replaced char if the string starts
|
||||
* with a \r\n pair (0x0d0a) add an extra \n
|
||||
* @param string $data data to edit
|
||||
* @param array $extractedColumnspec associative array containing type,
|
||||
* spec_in_brackets and possibly
|
||||
* enum_set_values (another array)
|
||||
* @param mixed[] $column description of column in given table
|
||||
* @param string $defaultCharEditing default char editing mode which is stored
|
||||
* in the config.inc.php script
|
||||
* @param string $backupField hidden input field
|
||||
* @param string $columnNameAppendix the name attribute
|
||||
* @param string $onChangeClause onchange clause for fields
|
||||
* @param int $tabindex tab index
|
||||
* @param string $specialChars special characters
|
||||
* @param int $tabindexForValue offset for the values tabindex
|
||||
* @param int $idindex id index
|
||||
* @param string $textDir text direction
|
||||
* @param string $specialCharsEncoded replaced char if the string starts
|
||||
* with a \r\n pair (0x0d0a) add an extra \n
|
||||
* @param string $data data to edit
|
||||
* @param mixed[] $extractedColumnspec associative array containing type,
|
||||
* spec_in_brackets and possibly
|
||||
* enum_set_values (another array)
|
||||
*
|
||||
* @return string an html snippet
|
||||
*/
|
||||
@ -803,8 +803,8 @@ class InsertEdit
|
||||
/**
|
||||
* Get the field size
|
||||
*
|
||||
* @param array $column description of column in given table
|
||||
* @param string $specInBrackets text in brackets inside column definition
|
||||
* @param mixed[] $column description of column in given table
|
||||
* @param string $specInBrackets text in brackets inside column definition
|
||||
*
|
||||
* @return int field size
|
||||
*/
|
||||
@ -837,9 +837,9 @@ class InsertEdit
|
||||
/**
|
||||
* get html for continue insertion form
|
||||
*
|
||||
* @param string $table name of the table
|
||||
* @param string $db name of the database
|
||||
* @param array $whereClauseArray
|
||||
* @param string $table name of the table
|
||||
* @param string $db name of the database
|
||||
* @param mixed[] $whereClauseArray
|
||||
*
|
||||
* @return string an html snippet
|
||||
*/
|
||||
@ -892,7 +892,7 @@ class InsertEdit
|
||||
/**
|
||||
* Get table head and table foot for insert row table
|
||||
*
|
||||
* @param array $urlParams url parameters
|
||||
* @param mixed[] $urlParams url parameters
|
||||
*
|
||||
* @return string an html snippet
|
||||
*/
|
||||
@ -920,16 +920,16 @@ class InsertEdit
|
||||
/**
|
||||
* Prepares the field value and retrieve special chars, backup field and data array
|
||||
*
|
||||
* @param array $currentRow a row of the table
|
||||
* @param array $column description of column in given table
|
||||
* @param array $extractedColumnspec associative array containing type,
|
||||
* spec_in_brackets and possibly
|
||||
* enum_set_values (another array)
|
||||
* @param array $gisDataTypes list of GIS data types
|
||||
* @param string $columnNameAppendix string to append to column name in input
|
||||
* @param bool $asIs use the data as is, used in repopulating
|
||||
* @param mixed[] $currentRow a row of the table
|
||||
* @param mixed[] $column description of column in given table
|
||||
* @param mixed[] $extractedColumnspec associative array containing type,
|
||||
* spec_in_brackets and possibly
|
||||
* enum_set_values (another array)
|
||||
* @param mixed[] $gisDataTypes list of GIS data types
|
||||
* @param string $columnNameAppendix string to append to column name in input
|
||||
* @param bool $asIs use the data as is, used in repopulating
|
||||
*
|
||||
* @return array $real_null_value, $data, $special_chars, $backup_field,
|
||||
* @return mixed[] $real_null_value, $data, $special_chars, $backup_field,
|
||||
* $special_chars_encoded
|
||||
*/
|
||||
private function getSpecialCharsAndBackupFieldForExistingRow(
|
||||
@ -1014,9 +1014,9 @@ class InsertEdit
|
||||
/**
|
||||
* display default values
|
||||
*
|
||||
* @param array $column description of column in given table
|
||||
* @param mixed[] $column description of column in given table
|
||||
*
|
||||
* @return array $real_null_value, $data, $special_chars,
|
||||
* @return mixed[] $real_null_value, $data, $special_chars,
|
||||
* $backup_field, $special_chars_encoded
|
||||
* @psalm-return array{bool, mixed, string, string, string}
|
||||
*/
|
||||
@ -1055,7 +1055,7 @@ class InsertEdit
|
||||
/**
|
||||
* Prepares the update/insert of a row
|
||||
*
|
||||
* @return array $loop_array, $using_key, $is_insert, $is_insertignore
|
||||
* @return mixed[] $loop_array, $using_key, $is_insert, $is_insertignore
|
||||
* @psalm-return array{array, bool, bool, bool}
|
||||
*/
|
||||
public function getParamsForUpdateOrInsert(): array
|
||||
@ -1163,7 +1163,7 @@ class InsertEdit
|
||||
/**
|
||||
* Defines the url to return in case of failure of the query
|
||||
*
|
||||
* @param array $urlParams url parameters
|
||||
* @param mixed[] $urlParams url parameters
|
||||
*
|
||||
* @return string error url for query failure
|
||||
*/
|
||||
@ -1179,11 +1179,11 @@ class InsertEdit
|
||||
/**
|
||||
* Builds the sql query
|
||||
*
|
||||
* @param bool $isInsertIgnore $_POST['submit_type'] === 'insertignore'
|
||||
* @param array $queryFields column names array
|
||||
* @param array $valueSets array of query values
|
||||
* @param bool $isInsertIgnore $_POST['submit_type'] === 'insertignore'
|
||||
* @param mixed[] $queryFields column names array
|
||||
* @param mixed[] $valueSets array of query values
|
||||
*
|
||||
* @return array of query
|
||||
* @return mixed[] of query
|
||||
* @psalm-return array{string}
|
||||
*/
|
||||
public function buildSqlQuery(bool $isInsertIgnore, array $queryFields, array $valueSets): array
|
||||
@ -1205,10 +1205,10 @@ class InsertEdit
|
||||
/**
|
||||
* Executes the sql query and get the result, then move back to the calling page
|
||||
*
|
||||
* @param array $urlParams url parameters array
|
||||
* @param array $query built query from buildSqlQuery()
|
||||
* @param mixed[] $urlParams url parameters array
|
||||
* @param mixed[] $query built query from buildSqlQuery()
|
||||
*
|
||||
* @return array $url_params, $total_affected_rows, $last_messages
|
||||
* @return mixed[] $url_params, $total_affected_rows, $last_messages
|
||||
* $warning_messages, $error_messages, $return_to_sql_query
|
||||
*/
|
||||
public function executeSqlQuery(array $urlParams, array $query): array
|
||||
@ -1285,10 +1285,10 @@ class InsertEdit
|
||||
/**
|
||||
* Column to display from the foreign table?
|
||||
*
|
||||
* @param string $whereComparison string that contain relation field value
|
||||
* @param array $map all Relations to foreign tables for a given
|
||||
* table or optionally a given column in a table
|
||||
* @param string $relationField relation field
|
||||
* @param string $whereComparison string that contain relation field value
|
||||
* @param mixed[] $map all Relations to foreign tables for a given
|
||||
* table or optionally a given column in a table
|
||||
* @param string $relationField relation field
|
||||
*
|
||||
* @return string display value from the foreign table
|
||||
*/
|
||||
@ -1323,12 +1323,12 @@ class InsertEdit
|
||||
/**
|
||||
* Display option in the cell according to user choices
|
||||
*
|
||||
* @param array $map all Relations to foreign tables for a given
|
||||
* table or optionally a given column in a table
|
||||
* @param string $relationField relation field
|
||||
* @param string $whereComparison string that contain relation field value
|
||||
* @param string $dispval display value from the foreign table
|
||||
* @param string $relationFieldValue relation field value
|
||||
* @param mixed[] $map all Relations to foreign tables for a given
|
||||
* table or optionally a given column in a table
|
||||
* @param string $relationField relation field
|
||||
* @param string $whereComparison string that contain relation field value
|
||||
* @param string $dispval display value from the foreign table
|
||||
* @param string $relationFieldValue relation field value
|
||||
*
|
||||
* @return string HTML <a> tag
|
||||
*/
|
||||
@ -1386,17 +1386,17 @@ class InsertEdit
|
||||
/**
|
||||
* Transform edited values
|
||||
*
|
||||
* @param string $db db name
|
||||
* @param string $table table name
|
||||
* @param array $transformation mimetypes for all columns of a table
|
||||
* [field_name][field_key]
|
||||
* @param array $editedValues transform columns list and new values
|
||||
* @param string $file file containing the transformation plugin
|
||||
* @param string $columnName column name
|
||||
* @param array $extraData extra data array
|
||||
* @param string $type the type of transformation
|
||||
* @param string $db db name
|
||||
* @param string $table table name
|
||||
* @param mixed[] $transformation mimetypes for all columns of a table
|
||||
* [field_name][field_key]
|
||||
* @param mixed[] $editedValues transform columns list and new values
|
||||
* @param string $file file containing the transformation plugin
|
||||
* @param string $columnName column name
|
||||
* @param mixed[] $extraData extra data array
|
||||
* @param string $type the type of transformation
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function transformEditedValues(
|
||||
string $db,
|
||||
@ -1657,10 +1657,10 @@ class InsertEdit
|
||||
* Check whether inline edited value can be truncated or not,
|
||||
* and add additional parameters for extra_data array if needed
|
||||
*
|
||||
* @param string $db Database name
|
||||
* @param string $table Table name
|
||||
* @param string $columnName Column name
|
||||
* @param array $extraData Extra data for ajax response
|
||||
* @param string $db Database name
|
||||
* @param string $table Table name
|
||||
* @param string $columnName Column name
|
||||
* @param mixed[] $extraData Extra data for ajax response
|
||||
*/
|
||||
public function verifyWhetherValueCanBeTruncatedAndAppendExtraData(
|
||||
string $db,
|
||||
@ -1706,7 +1706,7 @@ class InsertEdit
|
||||
* @param string $db current db
|
||||
* @param string $table current table
|
||||
*
|
||||
* @return array[]
|
||||
* @return mixed[][]
|
||||
*/
|
||||
public function getTableColumns(string $db, string $table): array
|
||||
{
|
||||
@ -1802,7 +1802,7 @@ class InsertEdit
|
||||
* @param string $db current database
|
||||
* @param string $table current table
|
||||
*
|
||||
* @return array comments for columns
|
||||
* @return mixed[] comments for columns
|
||||
*/
|
||||
public function getCommentsMap(string $db, string $table): array
|
||||
{
|
||||
@ -1857,20 +1857,20 @@ class InsertEdit
|
||||
/**
|
||||
* Function to get html for each insert/edit column
|
||||
*
|
||||
* @param array $column column
|
||||
* @param mixed[] $column column
|
||||
* @param int $columnNumber column index in table_columns
|
||||
* @param array $commentsMap comments map
|
||||
* @param mixed[] $commentsMap comments map
|
||||
* @param bool $timestampSeen whether timestamp seen
|
||||
* @param ResultInterface $currentResult current result
|
||||
* @param string $jsvkey javascript validation key
|
||||
* @param string $vkey validation key
|
||||
* @param bool $insertMode whether insert mode
|
||||
* @param array $currentRow current row
|
||||
* @param mixed[] $currentRow current row
|
||||
* @param int $oRows row offset
|
||||
* @param int $tabindex tab index
|
||||
* @param int $columnsCnt columns count
|
||||
* @param bool $isUpload whether upload
|
||||
* @param array $foreigners foreigners
|
||||
* @param mixed[] $foreigners foreigners
|
||||
* @param int $tabindexForValue tab index offset for value
|
||||
* @param string $table table
|
||||
* @param string $db database
|
||||
@ -1878,8 +1878,8 @@ class InsertEdit
|
||||
* @param int $biggestMaxFileSize biggest max file size
|
||||
* @param string $defaultCharEditing default char editing mode which is stored in the config.inc.php script
|
||||
* @param string $textDir text direction
|
||||
* @param array $repopulate the data to be repopulated
|
||||
* @param array $columnMime the mime information of column
|
||||
* @param mixed[] $repopulate the data to be repopulated
|
||||
* @param mixed[] $columnMime the mime information of column
|
||||
* @param string $whereClause the where clause
|
||||
*/
|
||||
private function getHtmlForInsertEditFormColumn(
|
||||
@ -2214,6 +2214,7 @@ class InsertEdit
|
||||
]);
|
||||
}
|
||||
|
||||
/** @param mixed[] $column */
|
||||
private function isColumnBinary(array $column, bool $isUpload): bool
|
||||
{
|
||||
if (! $GLOBALS['cfg']['ShowFunctionFields']) {
|
||||
@ -2228,28 +2229,28 @@ class InsertEdit
|
||||
/**
|
||||
* Function to get html for each insert/edit row
|
||||
*
|
||||
* @param array $urlParams url parameters
|
||||
* @param array[] $tableColumns table columns
|
||||
* @param array $commentsMap comments map
|
||||
* @param mixed[] $urlParams url parameters
|
||||
* @param mixed[][] $tableColumns table columns
|
||||
* @param mixed[] $commentsMap comments map
|
||||
* @param bool $timestampSeen whether timestamp seen
|
||||
* @param ResultInterface $currentResult current result
|
||||
* @param string $jsvkey javascript validation key
|
||||
* @param string $vkey validation key
|
||||
* @param bool $insertMode whether insert mode
|
||||
* @param array $currentRow current row
|
||||
* @param mixed[] $currentRow current row
|
||||
* @param int $oRows row offset
|
||||
* @param int $tabindex tab index
|
||||
* @param int $columnsCnt columns count
|
||||
* @param bool $isUpload whether upload
|
||||
* @param array $foreigners foreigners
|
||||
* @param mixed[] $foreigners foreigners
|
||||
* @param int $tabindexForValue tab index offset for value
|
||||
* @param string $table table
|
||||
* @param string $db database
|
||||
* @param int $rowId row id
|
||||
* @param int $biggestMaxFileSize biggest max file size
|
||||
* @param string $textDir text direction
|
||||
* @param array $repopulate the data to be repopulated
|
||||
* @param array $whereClauseArray the array of where clauses
|
||||
* @param mixed[] $repopulate the data to be repopulated
|
||||
* @param mixed[] $whereClauseArray the array of where clauses
|
||||
*/
|
||||
public function getHtmlForInsertEditRow(
|
||||
array $urlParams,
|
||||
|
||||
@ -12,7 +12,7 @@ namespace PhpMyAdmin;
|
||||
*/
|
||||
class InternalRelations
|
||||
{
|
||||
/** @var array */
|
||||
/** @var mixed[] */
|
||||
private static array $informationSchema = [
|
||||
'CHARACTER_SETS' => [
|
||||
'DEFAULT_COLLATE_NAME' => [
|
||||
@ -325,7 +325,7 @@ class InternalRelations
|
||||
],
|
||||
];
|
||||
|
||||
/** @var array */
|
||||
/** @var mixed[] */
|
||||
private static array $mysql = [
|
||||
'columns_priv' => [
|
||||
'Db' => [
|
||||
@ -481,13 +481,13 @@ class InternalRelations
|
||||
],
|
||||
];
|
||||
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getInformationSchema(): array
|
||||
{
|
||||
return self::$informationSchema;
|
||||
}
|
||||
|
||||
/** @return array */
|
||||
/** @return mixed[] */
|
||||
public static function getMySql(): array
|
||||
{
|
||||
return self::$mysql;
|
||||
|
||||
@ -708,7 +708,7 @@ class LanguageManager
|
||||
],
|
||||
];
|
||||
|
||||
/** @var array */
|
||||
/** @var mixed[] */
|
||||
private array $availableLocales = [];
|
||||
|
||||
/** @var Language[] */
|
||||
@ -737,7 +737,7 @@ class LanguageManager
|
||||
/**
|
||||
* Returns list of available locales
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function listLocaleDir(): array
|
||||
{
|
||||
@ -776,7 +776,7 @@ class LanguageManager
|
||||
/**
|
||||
* Returns (cached) list of all available locales
|
||||
*
|
||||
* @return array of strings
|
||||
* @return mixed[] of strings
|
||||
*/
|
||||
public function availableLocales(): array
|
||||
{
|
||||
|
||||
@ -69,10 +69,10 @@ class Linter
|
||||
/**
|
||||
* Computes the number of the line and column given an absolute position.
|
||||
*
|
||||
* @param array $lines The starting position of each line.
|
||||
* @param int $pos The absolute position
|
||||
* @param mixed[] $lines The starting position of each line.
|
||||
* @param int $pos The absolute position
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public static function findLineNumberAndColumn(array $lines, int $pos): array
|
||||
{
|
||||
@ -93,7 +93,7 @@ class Linter
|
||||
*
|
||||
* @param string $query The query to be checked.
|
||||
*
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
public static function lint(string $query): array
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user