diff --git a/libraries/classes/Advisory/Advisor.php b/libraries/classes/Advisory/Advisor.php
index 445b2df31c..d75855fb85 100644
--- a/libraries/classes/Advisory/Advisor.php
+++ b/libraries/classes/Advisory/Advisor.php
@@ -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
*/
diff --git a/libraries/classes/Bookmark.php b/libraries/classes/Bookmark.php
index 5c5a27de53..661942ea11 100644
--- a/libraries/classes/Bookmark.php
+++ b/libraries/classes/Bookmark.php
@@ -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));
diff --git a/libraries/classes/BrowseForeigners.php b/libraries/classes/BrowseForeigners.php
index ad401c17e6..6e6b14e8a1 100644
--- a/libraries/classes/BrowseForeigners.php
+++ b/libraries/classes/BrowseForeigners.php
@@ -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
{
diff --git a/libraries/classes/Command/TwigLintCommand.php b/libraries/classes/Command/TwigLintCommand.php
index 1e26fe11c3..8d00248ed8 100644
--- a/libraries/classes/Command/TwigLintCommand.php
+++ b/libraries/classes/Command/TwigLintCommand.php
@@ -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);
diff --git a/libraries/classes/Config.php b/libraries/classes/Config.php
index 4b16893f52..ab740fa48c 100644
--- a/libraries/classes/Config.php
+++ b/libraries/classes/Config.php
@@ -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
{
diff --git a/libraries/classes/Config/ConfigFile.php b/libraries/classes/Config/ConfigFile.php
index 76f7d8aedc..b45dbf5610 100644
--- a/libraries/classes/Config/ConfigFile.php
+++ b/libraries/classes/Config/ConfigFile.php
@@ -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
{
diff --git a/libraries/classes/Config/Form.php b/libraries/classes/Config/Form.php
index af62b57670..f3fc50417a 100644
--- a/libraries/classes/Config/Form.php
+++ b/libraries/classes/Config/Form.php
@@ -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
{
diff --git a/libraries/classes/Config/FormDisplay.php b/libraries/classes/Config/FormDisplay.php
index 79383e0e9d..b8b6e2a14c 100644
--- a/libraries/classes/Config/FormDisplay.php
+++ b/libraries/classes/Config/FormDisplay.php
@@ -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
{
diff --git a/libraries/classes/Config/FormDisplayTemplate.php b/libraries/classes/Config/FormDisplayTemplate.php
index 589a14a7b7..a1a2fd54b1 100644
--- a/libraries/classes/Config/FormDisplayTemplate.php
+++ b/libraries/classes/Config/FormDisplayTemplate.php
@@ -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);
diff --git a/libraries/classes/Config/Forms/BaseForm.php b/libraries/classes/Config/Forms/BaseForm.php
index b761300497..b51d9a9eb3 100644
--- a/libraries/classes/Config/Forms/BaseForm.php
+++ b/libraries/classes/Config/Forms/BaseForm.php
@@ -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
*/
diff --git a/libraries/classes/Config/Forms/Page/BrowseForm.php b/libraries/classes/Config/Forms/Page/BrowseForm.php
index a4e8d7ca17..d12352ea2e 100644
--- a/libraries/classes/Config/Forms/Page/BrowseForm.php
+++ b/libraries/classes/Config/Forms/Page/BrowseForm.php
@@ -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']];
diff --git a/libraries/classes/Config/Forms/Page/DbStructureForm.php b/libraries/classes/Config/Forms/Page/DbStructureForm.php
index 84e49d8009..25bc25ba0d 100644
--- a/libraries/classes/Config/Forms/Page/DbStructureForm.php
+++ b/libraries/classes/Config/Forms/Page/DbStructureForm.php
@@ -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']];
diff --git a/libraries/classes/Config/Forms/Page/EditForm.php b/libraries/classes/Config/Forms/Page/EditForm.php
index 5dd9d18351..f3f1f2eec6 100644
--- a/libraries/classes/Config/Forms/Page/EditForm.php
+++ b/libraries/classes/Config/Forms/Page/EditForm.php
@@ -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']];
diff --git a/libraries/classes/Config/Forms/Page/TableStructureForm.php b/libraries/classes/Config/Forms/Page/TableStructureForm.php
index 72181f842e..81c891be8e 100644
--- a/libraries/classes/Config/Forms/Page/TableStructureForm.php
+++ b/libraries/classes/Config/Forms/Page/TableStructureForm.php
@@ -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']];
diff --git a/libraries/classes/Config/Forms/Setup/ConfigForm.php b/libraries/classes/Config/Forms/Setup/ConfigForm.php
index ead35cfbd7..e5844139cd 100644
--- a/libraries/classes/Config/Forms/Setup/ConfigForm.php
+++ b/libraries/classes/Config/Forms/Setup/ConfigForm.php
@@ -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']];
diff --git a/libraries/classes/Config/Forms/Setup/FeaturesForm.php b/libraries/classes/Config/Forms/Setup/FeaturesForm.php
index fb367accdc..f569e594eb 100644
--- a/libraries/classes/Config/Forms/Setup/FeaturesForm.php
+++ b/libraries/classes/Config/Forms/Setup/FeaturesForm.php
@@ -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
diff --git a/libraries/classes/Config/Forms/Setup/MainForm.php b/libraries/classes/Config/Forms/Setup/MainForm.php
index dcd5967686..d4fe5d7490 100644
--- a/libraries/classes/Config/Forms/Setup/MainForm.php
+++ b/libraries/classes/Config/Forms/Setup/MainForm.php
@@ -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();
diff --git a/libraries/classes/Config/Forms/Setup/ServersForm.php b/libraries/classes/Config/Forms/Setup/ServersForm.php
index 881bee3659..94f3b30d9a 100644
--- a/libraries/classes/Config/Forms/Setup/ServersForm.php
+++ b/libraries/classes/Config/Forms/Setup/ServersForm.php
@@ -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
diff --git a/libraries/classes/Config/Forms/Setup/SqlForm.php b/libraries/classes/Config/Forms/Setup/SqlForm.php
index 3a10a11a0a..f36f855daf 100644
--- a/libraries/classes/Config/Forms/Setup/SqlForm.php
+++ b/libraries/classes/Config/Forms/Setup/SqlForm.php
@@ -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();
diff --git a/libraries/classes/Config/Forms/User/ExportForm.php b/libraries/classes/Config/Forms/User/ExportForm.php
index d8be44e9d4..237a84fdaa 100644
--- a/libraries/classes/Config/Forms/User/ExportForm.php
+++ b/libraries/classes/Config/Forms/User/ExportForm.php
@@ -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
diff --git a/libraries/classes/Config/Forms/User/FeaturesForm.php b/libraries/classes/Config/Forms/User/FeaturesForm.php
index c7afe7c18c..f0de0a8398 100644
--- a/libraries/classes/Config/Forms/User/FeaturesForm.php
+++ b/libraries/classes/Config/Forms/User/FeaturesForm.php
@@ -13,7 +13,7 @@ use function __;
class FeaturesForm extends BaseForm
{
- /** @return array */
+ /** @return mixed[] */
public static function getForms(): array
{
$result = [
diff --git a/libraries/classes/Config/Forms/User/ImportForm.php b/libraries/classes/Config/Forms/User/ImportForm.php
index c601eff65a..c7614c90cd 100644
--- a/libraries/classes/Config/Forms/User/ImportForm.php
+++ b/libraries/classes/Config/Forms/User/ImportForm.php
@@ -13,7 +13,7 @@ use function __;
class ImportForm extends BaseForm
{
- /** @return array */
+ /** @return mixed[] */
public static function getForms(): array
{
return [
diff --git a/libraries/classes/Config/Forms/User/MainForm.php b/libraries/classes/Config/Forms/User/MainForm.php
index 938032076e..40dac4a3ad 100644
--- a/libraries/classes/Config/Forms/User/MainForm.php
+++ b/libraries/classes/Config/Forms/User/MainForm.php
@@ -13,7 +13,7 @@ use function __;
class MainForm extends BaseForm
{
- /** @return array */
+ /** @return mixed[] */
public static function getForms(): array
{
return [
diff --git a/libraries/classes/Config/Forms/User/NaviForm.php b/libraries/classes/Config/Forms/User/NaviForm.php
index 0f5c7c107b..100f870800 100644
--- a/libraries/classes/Config/Forms/User/NaviForm.php
+++ b/libraries/classes/Config/Forms/User/NaviForm.php
@@ -13,7 +13,7 @@ use function __;
class NaviForm extends BaseForm
{
- /** @return array */
+ /** @return mixed[] */
public static function getForms(): array
{
return [
diff --git a/libraries/classes/Config/Forms/User/SqlForm.php b/libraries/classes/Config/Forms/User/SqlForm.php
index 509bfce65a..0985041b4f 100644
--- a/libraries/classes/Config/Forms/User/SqlForm.php
+++ b/libraries/classes/Config/Forms/User/SqlForm.php
@@ -13,7 +13,7 @@ use function __;
class SqlForm extends BaseForm
{
- /** @return array */
+ /** @return mixed[] */
public static function getForms(): array
{
return [
diff --git a/libraries/classes/Config/Validator.php b/libraries/classes/Config/Validator.php
index 42b14429b4..30bae1a7b2 100644
--- a/libraries/classes/Config/Validator.php
+++ b/libraries/classes/Config/Validator.php
@@ -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 and 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
{
diff --git a/libraries/classes/ConfigStorage/Relation.php b/libraries/classes/ConfigStorage/Relation.php
index 563c7c00df..557863994d 100644
--- a/libraries/classes/ConfigStorage/Relation.php
+++ b/libraries/classes/ConfigStorage/Relation.php
@@ -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