diff --git a/libraries/classes/Charsets/Charset.php b/libraries/classes/Charsets/Charset.php index e0f97840d7..ddb1118e4b 100644 --- a/libraries/classes/Charsets/Charset.php +++ b/libraries/classes/Charsets/Charset.php @@ -13,41 +13,17 @@ namespace PhpMyAdmin\Charsets; final class Charset { /** - * The character set name - */ - private string $name; - - /** - * A description of the character set - */ - private string $description; - - /** - * The default collation for the character set - */ - private string $defaultCollation; - - /** - * The maximum number of bytes required to store one character - */ - private int $maxLength; - - /** - * @param string $name Charset name - * @param string $description Description - * @param string $defaultCollation Default collation - * @param int $maxLength Maximum length + * @param string $name The character set name + * @param string $description A description of the character set + * @param string $defaultCollation The default collation for the character set + * @param int $maxLength The maximum number of bytes required to store one character */ private function __construct( - string $name, - string $description, - string $defaultCollation, - int $maxLength, + private string $name, + private string $description, + private string $defaultCollation, + private int $maxLength, ) { - $this->name = $name; - $this->description = $description; - $this->defaultCollation = $defaultCollation; - $this->maxLength = $maxLength; } /** diff --git a/libraries/classes/Charsets/Collation.php b/libraries/classes/Charsets/Collation.php index e0e7c775dd..b077053cee 100644 --- a/libraries/classes/Charsets/Collation.php +++ b/libraries/classes/Charsets/Collation.php @@ -17,71 +17,29 @@ use function implode; */ final class Collation { - /** - * The collation name - */ - private string $name; - /** * A description of the collation */ private string $description; /** - * The name of the character set with which the collation is associated - */ - private string $charset; - - /** - * The collation ID - */ - private int $id; - - /** - * Whether the collation is the default for its character set - */ - private bool $isDefault; - - /** - * Whether the character set is compiled into the server - */ - private bool $isCompiled; - - /** - * Used for determining the memory used to sort strings in this collation - */ - private int $sortLength; - - /** - * The collation pad attribute - */ - private string $padAttribute; - - /** - * @param string $name Collation name - * @param string $charset Related charset - * @param int $id Collation ID - * @param bool $isDefault Whether is the default - * @param bool $isCompiled Whether the charset is compiled - * @param int $sortLength Sort length - * @param string $padAttribute Pad attribute + * @param string $name The collation name + * @param string $charset The name of the character set with which the collation is associated + * @param int $id The collation ID + * @param bool $isDefault Whether the collation is the default for its character set + * @param bool $isCompiled Whether the character set is compiled into the server + * @param int $sortLength Used for determining the memory used to sort strings in this collation + * @param string $padAttribute The collation pad attribute */ private function __construct( - string $name, - string $charset, - int $id, - bool $isDefault, - bool $isCompiled, - int $sortLength, - string $padAttribute, + private string $name, + private string $charset, + private int $id, + private bool $isDefault, + private bool $isCompiled, + private int $sortLength, + private string $padAttribute, ) { - $this->name = $name; - $this->charset = $charset; - $this->id = $id; - $this->isDefault = $isDefault; - $this->isCompiled = $isCompiled; - $this->sortLength = $sortLength; - $this->padAttribute = $padAttribute; $this->description = $this->buildDescription(); } diff --git a/libraries/classes/Config/ConfigFile.php b/libraries/classes/Config/ConfigFile.php index 3b614631aa..65cdbd3d94 100644 --- a/libraries/classes/Config/ConfigFile.php +++ b/libraries/classes/Config/ConfigFile.php @@ -41,13 +41,6 @@ class ConfigFile */ private array $cfgDb; - /** - * Stores original PMA config, not modified by user preferences - * - * @var mixed[]|null - */ - private array|null $baseCfg = null; - /** * Whether we are currently working in PMA Setup context */ @@ -81,10 +74,11 @@ class ConfigFile /** * @param mixed[]|null $baseConfig base configuration read from - * {@link PhpMyAdmin\Config::$base_config}, - * use only when not in PMA Setup + {@link PhpMyAdmin\Config::$base_config}, + use only when not in PMA Setup + Stores original PMA config, not modified by user preferences */ - public function __construct(array|null $baseConfig = null) + public function __construct(private array|null $baseConfig = null) { // load default config values $settings = new Settings([]); @@ -92,8 +86,6 @@ class ConfigFile // load additional config information $this->cfgDb = $this->getAllowedValues(); - - $this->baseCfg = $baseConfig; $this->isInSetup = $baseConfig === null; $this->id = 'ConfigFile' . $GLOBALS['server']; if (isset($_SESSION[$this->id])) { @@ -206,7 +198,7 @@ class ConfigFile // get original config values not overwritten by user // preferences to allow for overwriting options set in // config.inc.php with default values - $instanceDefaultValue = Core::arrayRead($canonicalPath, $this->baseCfg); + $instanceDefaultValue = Core::arrayRead($canonicalPath, $this->baseConfig); // remove if it has a default value and base config (config.inc.php) // uses default value $removePath = $removePath diff --git a/libraries/classes/Config/Form.php b/libraries/classes/Config/Form.php index f3fc50417a..e6fb04d454 100644 --- a/libraries/classes/Config/Form.php +++ b/libraries/classes/Config/Form.php @@ -36,11 +36,6 @@ class Form */ public string $name; - /** - * Arbitrary index, doesn't affect class' behavior - */ - public int|null $index; - /** * Form fields (paths), filled by {@link readFormPaths()}, indexed by field name * @@ -62,11 +57,6 @@ class Form */ private array $fieldsTypes; - /** - * ConfigFile instance - */ - private ConfigFile $configFile; - /** * A counter for the number of groups */ @@ -75,19 +65,17 @@ class Form /** * Reads default config values * - * @param string $formName Form name - * @param mixed[] $form Form data - * @param ConfigFile $cf Config file instance - * @param int|null $index arbitrary index, stored in Form::$index + * @param string $formName Form name + * @param mixed[] $form Form data + * @param ConfigFile $configFile ConfigFile instance + * @param int|null $index Arbitrary index, doesn't affect class' behavior */ public function __construct( string $formName, array $form, - ConfigFile $cf, - int|null $index = null, + private ConfigFile $configFile, + public int|null $index = null, ) { - $this->index = $index; - $this->configFile = $cf; $this->loadForm($formName, $form); } diff --git a/libraries/classes/Config/FormDisplay.php b/libraries/classes/Config/FormDisplay.php index 8d6f66e075..55b93c81e4 100644 --- a/libraries/classes/Config/FormDisplay.php +++ b/libraries/classes/Config/FormDisplay.php @@ -45,11 +45,6 @@ use const E_USER_WARNING; */ class FormDisplay { - /** - * ConfigFile instance - */ - private ConfigFile $configFile; - /** * Form list * @@ -102,11 +97,9 @@ class FormDisplay private bool $isSetupScript; - /** @param ConfigFile $cf Config file instance */ - public function __construct(ConfigFile $cf) + public function __construct(private ConfigFile $configFile) { $this->formDisplayTemplate = new FormDisplayTemplate($GLOBALS['config']); - $this->configFile = $cf; $this->isSetupScript = Sanitize::isSetup(); // initialize validators Validator::getValidators($this->configFile); diff --git a/libraries/classes/Config/ServerConfigChecks.php b/libraries/classes/Config/ServerConfigChecks.php index a033998e80..8f45fad384 100644 --- a/libraries/classes/Config/ServerConfigChecks.php +++ b/libraries/classes/Config/ServerConfigChecks.php @@ -30,13 +30,8 @@ use const SODIUM_CRYPTO_SECRETBOX_KEYBYTES; */ class ServerConfigChecks { - /** @var ConfigFile configurations being checked */ - protected ConfigFile $cfg; - - /** @param ConfigFile $cfg Configuration */ - public function __construct(ConfigFile $cfg) + public function __construct(protected ConfigFile $cfg) { - $this->cfg = $cfg; } /** diff --git a/libraries/classes/Controllers/Server/Privileges/AccountLockController.php b/libraries/classes/Controllers/Server/Privileges/AccountLockController.php index ff6e1c7f88..da0624f841 100644 --- a/libraries/classes/Controllers/Server/Privileges/AccountLockController.php +++ b/libraries/classes/Controllers/Server/Privileges/AccountLockController.php @@ -17,13 +17,9 @@ use function __; final class AccountLockController extends AbstractController { - private AccountLocking $model; - - public function __construct(ResponseRenderer $response, Template $template, AccountLocking $accountLocking) + public function __construct(ResponseRenderer $response, Template $template, private AccountLocking $model) { parent::__construct($response, $template); - - $this->model = $accountLocking; } public function __invoke(ServerRequest $request): void diff --git a/libraries/classes/Controllers/Server/Privileges/AccountUnlockController.php b/libraries/classes/Controllers/Server/Privileges/AccountUnlockController.php index c7e1313c73..277e693dc2 100644 --- a/libraries/classes/Controllers/Server/Privileges/AccountUnlockController.php +++ b/libraries/classes/Controllers/Server/Privileges/AccountUnlockController.php @@ -17,13 +17,9 @@ use function __; final class AccountUnlockController extends AbstractController { - private AccountLocking $model; - - public function __construct(ResponseRenderer $response, Template $template, AccountLocking $accountLocking) + public function __construct(ResponseRenderer $response, Template $template, private AccountLocking $model) { parent::__construct($response, $template); - - $this->model = $accountLocking; } public function __invoke(ServerRequest $request): void diff --git a/libraries/classes/Controllers/Table/Partition/AnalyzeController.php b/libraries/classes/Controllers/Table/Partition/AnalyzeController.php index ffb01b2a73..ebbcd9f8ff 100644 --- a/libraries/classes/Controllers/Table/Partition/AnalyzeController.php +++ b/libraries/classes/Controllers/Table/Partition/AnalyzeController.php @@ -21,16 +21,12 @@ use function __; final class AnalyzeController extends AbstractController { - private Maintenance $model; - public function __construct( ResponseRenderer $response, Template $template, - Maintenance $maintenance, + private Maintenance $model, ) { parent::__construct($response, $template); - - $this->model = $maintenance; } public function __invoke(ServerRequest $request): void diff --git a/libraries/classes/Controllers/Table/Partition/CheckController.php b/libraries/classes/Controllers/Table/Partition/CheckController.php index b249388c68..ec398d1910 100644 --- a/libraries/classes/Controllers/Table/Partition/CheckController.php +++ b/libraries/classes/Controllers/Table/Partition/CheckController.php @@ -21,16 +21,12 @@ use function __; final class CheckController extends AbstractController { - private Maintenance $model; - public function __construct( ResponseRenderer $response, Template $template, - Maintenance $maintenance, + private Maintenance $model, ) { parent::__construct($response, $template); - - $this->model = $maintenance; } public function __invoke(ServerRequest $request): void diff --git a/libraries/classes/Controllers/Table/Partition/DropController.php b/libraries/classes/Controllers/Table/Partition/DropController.php index 055660ff69..b220b53975 100644 --- a/libraries/classes/Controllers/Table/Partition/DropController.php +++ b/libraries/classes/Controllers/Table/Partition/DropController.php @@ -21,16 +21,12 @@ use function __; final class DropController extends AbstractController { - private Maintenance $model; - public function __construct( ResponseRenderer $response, Template $template, - Maintenance $maintenance, + private Maintenance $model, ) { parent::__construct($response, $template); - - $this->model = $maintenance; } public function __invoke(ServerRequest $request): void diff --git a/libraries/classes/Controllers/Table/Partition/OptimizeController.php b/libraries/classes/Controllers/Table/Partition/OptimizeController.php index 89ccae44e1..b83663b666 100644 --- a/libraries/classes/Controllers/Table/Partition/OptimizeController.php +++ b/libraries/classes/Controllers/Table/Partition/OptimizeController.php @@ -21,16 +21,12 @@ use function __; final class OptimizeController extends AbstractController { - private Maintenance $model; - public function __construct( ResponseRenderer $response, Template $template, - Maintenance $maintenance, + private Maintenance $model, ) { parent::__construct($response, $template); - - $this->model = $maintenance; } public function __invoke(ServerRequest $request): void diff --git a/libraries/classes/Controllers/Table/Partition/RebuildController.php b/libraries/classes/Controllers/Table/Partition/RebuildController.php index cfa0090e55..6fa9700a57 100644 --- a/libraries/classes/Controllers/Table/Partition/RebuildController.php +++ b/libraries/classes/Controllers/Table/Partition/RebuildController.php @@ -21,16 +21,12 @@ use function __; final class RebuildController extends AbstractController { - private Maintenance $model; - public function __construct( ResponseRenderer $response, Template $template, - Maintenance $maintenance, + private Maintenance $model, ) { parent::__construct($response, $template); - - $this->model = $maintenance; } public function __invoke(ServerRequest $request): void diff --git a/libraries/classes/Controllers/Table/Partition/RepairController.php b/libraries/classes/Controllers/Table/Partition/RepairController.php index e337527990..ee5e5bb47b 100644 --- a/libraries/classes/Controllers/Table/Partition/RepairController.php +++ b/libraries/classes/Controllers/Table/Partition/RepairController.php @@ -21,16 +21,12 @@ use function __; final class RepairController extends AbstractController { - private Maintenance $model; - public function __construct( ResponseRenderer $response, Template $template, - Maintenance $maintenance, + private Maintenance $model, ) { parent::__construct($response, $template); - - $this->model = $maintenance; } public function __invoke(ServerRequest $request): void diff --git a/libraries/classes/Controllers/Table/Partition/TruncateController.php b/libraries/classes/Controllers/Table/Partition/TruncateController.php index 710e34abc3..9ab1937a40 100644 --- a/libraries/classes/Controllers/Table/Partition/TruncateController.php +++ b/libraries/classes/Controllers/Table/Partition/TruncateController.php @@ -21,16 +21,12 @@ use function __; final class TruncateController extends AbstractController { - private Maintenance $model; - public function __construct( ResponseRenderer $response, Template $template, - Maintenance $maintenance, + private Maintenance $model, ) { parent::__construct($response, $template); - - $this->model = $maintenance; } public function __invoke(ServerRequest $request): void diff --git a/libraries/classes/Database/Search.php b/libraries/classes/Database/Search.php index 865dd513fd..65f935ebba 100644 --- a/libraries/classes/Database/Search.php +++ b/libraries/classes/Database/Search.php @@ -24,11 +24,6 @@ use function is_string; */ class Search { - /** - * Database name - */ - private string $db; - /** * Table Names * @@ -70,10 +65,8 @@ class Search */ private string $criteriaColumnName; - /** @param string $db Database name */ - public function __construct(private DatabaseInterface $dbi, string $db, public Template $template) + public function __construct(private DatabaseInterface $dbi, private string $db, public Template $template) { - $this->db = $db; $this->searchTypes = [ '1' => __('at least one of the words'), '2' => __('all of the words'), diff --git a/libraries/classes/DatabaseInterface.php b/libraries/classes/DatabaseInterface.php index 1dd6d009b9..552e5fb12d 100644 --- a/libraries/classes/DatabaseInterface.php +++ b/libraries/classes/DatabaseInterface.php @@ -94,8 +94,6 @@ class DatabaseInterface implements DbalInterface */ public const GETVAR_GLOBAL = 2; - private DbiExtension $extension; - /** * Opened database connections. * @@ -133,10 +131,9 @@ class DatabaseInterface implements DbalInterface private ListDatabase|null $databaseList = null; - /** @param DbiExtension $ext Object to be used for database queries */ - public function __construct(DbiExtension $ext) + /** @param DbiExtension $extension Object to be used for database queries */ + public function __construct(private DbiExtension $extension) { - $this->extension = $ext; if (defined('TESTSUITE')) { $this->connections[Connection::TYPE_USER] = new Connection(new stdClass()); $this->connections[Connection::TYPE_CONTROL] = new Connection(new stdClass()); diff --git a/libraries/classes/Export/Template.php b/libraries/classes/Export/Template.php index 835b971c81..af8f107649 100644 --- a/libraries/classes/Export/Template.php +++ b/libraries/classes/Export/Template.php @@ -7,17 +7,13 @@ namespace PhpMyAdmin\Export; /** @psalm-immutable */ final class Template { - /** @var string JSON */ - private string $data; - private function __construct( private int $id, private string $username, private string $exportType, private string $name, - string $data, + private string $data, ) { - $this->data = $data; } /** @param array $state */ diff --git a/libraries/classes/Gis/GisVisualization.php b/libraries/classes/Gis/GisVisualization.php index 8abf217cbf..81bbc0e7d3 100644 --- a/libraries/classes/Gis/GisVisualization.php +++ b/libraries/classes/Gis/GisVisualization.php @@ -65,11 +65,6 @@ class GisVisualization private string|null $labelColumn; - /** Number of rows */ - private int $rows; - /** Start position */ - private int $pos; - public function getWidth(): int { return $this->width; @@ -158,11 +153,15 @@ class GisVisualization * or an array with data. * If it is an array row and pos are ignored * @param array $options Users specified options - * @param int $rows number of rows - * @param int $pos start position + * @param int $rows Number of rows + * @param int $pos Start position */ - private function __construct(array|string $sqlOrData, array $options, int $rows = 0, int $pos = 0) - { + private function __construct( + array|string $sqlOrData, + array $options, + private int $rows = 0, + private int $pos = 0, + ) { $width = $options['width'] ?? null; Assert::positiveInteger($width); $this->width = $width; @@ -179,9 +178,6 @@ class GisVisualization Assert::nullOrStringNotEmpty($labelColumn); $this->labelColumn = $labelColumn; - $this->pos = $pos; - $this->rows = $rows; - $this->data = is_string($sqlOrData) ? $this->modifyQueryAndFetch($sqlOrData) : $sqlOrData; diff --git a/libraries/classes/Git.php b/libraries/classes/Git.php index c81d226d94..114fb6b635 100644 --- a/libraries/classes/Git.php +++ b/libraries/classes/Git.php @@ -49,11 +49,6 @@ use const DIRECTORY_SEPARATOR; */ class Git { - /** - * Enable Git information search and process - */ - private bool $showGitRevision; - /** * The path where the to search for .git folders */ @@ -64,9 +59,9 @@ class Git */ private bool $hasGit = false; - public function __construct(bool $showGitRevision, string|null $baseDir = null) + /** @param bool $showGitRevision Enable Git information search and process */ + public function __construct(private bool $showGitRevision, string|null $baseDir = null) { - $this->showGitRevision = $showGitRevision; $this->baseDir = $baseDir ?? ROOT_PATH; } diff --git a/libraries/classes/Menu.php b/libraries/classes/Menu.php index cf5b2836d5..08e4f04fda 100644 --- a/libraries/classes/Menu.php +++ b/libraries/classes/Menu.php @@ -28,16 +28,6 @@ use function preg_replace; */ class Menu { - /** - * Database name - */ - private string $db; - - /** - * Table name - */ - private string $table; - private Relation $relation; /** @@ -49,11 +39,9 @@ class Menu public function __construct( private DatabaseInterface $dbi, private readonly Template $template, - string $db, - string $table, + private string $db, + private string $table, ) { - $this->db = $db; - $this->table = $table; $this->relation = new Relation($dbi); } diff --git a/libraries/classes/RecentFavoriteTable.php b/libraries/classes/RecentFavoriteTable.php index 45da2b1b9c..059b7359d4 100644 --- a/libraries/classes/RecentFavoriteTable.php +++ b/libraries/classes/RecentFavoriteTable.php @@ -41,11 +41,6 @@ class RecentFavoriteTable */ private array $tables; - /** - * Defines type of action, Favorite or Recent table. - */ - private string $tableType; - /** * RecentFavoriteTable instances. * @@ -58,13 +53,12 @@ class RecentFavoriteTable /** * Creates a new instance of RecentFavoriteTable * - * @param string $type the table type - * @phpstan-param 'favorite'|'recent' $type + * @param string $tableType Defines type of action, Favorite or Recent table. + * @phpstan-param 'favorite'|'recent' $tableType */ - private function __construct(public Template $template, string $type) + private function __construct(public Template $template, private string $tableType) { $this->relation = new Relation($GLOBALS['dbi']); - $this->tableType = $type; $serverId = $GLOBALS['server']; // Code search hint: recentTables // Code search hint: favoriteTables @@ -141,16 +135,10 @@ class RecentFavoriteTable $success = $GLOBALS['dbi']->tryQuery($sqlQuery, Connection::TYPE_CONTROL); if (! $success) { - $errorMsg = ''; - switch ($this->tableType) { - case 'recent': - $errorMsg = __('Could not save recent table!'); - break; - - case 'favorite': - $errorMsg = __('Could not save favorite table!'); - break; - } + $errorMsg = match ($this->tableType) { + 'recent' => __('Could not save recent table!'), + 'favorite' => __('Could not save favorite table!'), + }; $message = Message::error($errorMsg); $message->addMessage( diff --git a/libraries/classes/Table.php b/libraries/classes/Table.php index 3cf9c9e217..0e19d5dd71 100644 --- a/libraries/classes/Table.php +++ b/libraries/classes/Table.php @@ -90,23 +90,15 @@ class Table implements Stringable /** @var mixed[] messages */ public array $messages = []; - /** @var string table name */ - protected string $name = ''; - - /** @var string database name */ - protected string $dbName = ''; - private Relation $relation; /** - * @param string $tableName table name - * @param string $dbName database name - * @param DatabaseInterface $dbi database interface for the table + * @param string $name table name + * @param string $dbName database name + * @param DatabaseInterface $dbi database interface for the table */ - public function __construct(string $tableName, string $dbName, protected DatabaseInterface $dbi) + public function __construct(protected string $name, protected string $dbName, protected DatabaseInterface $dbi) { - $this->name = $tableName; - $this->dbName = $dbName; $this->relation = new Relation($this->dbi); } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index ba6c214643..a9150efe23 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -8206,12 +8206,12 @@ parameters: path: libraries/classes/Controllers/Table/RelationController.php - - message: "#^Parameter \\#1 \\$queryData of static method PhpMyAdmin\\\\Core\\:\\:previewSQL\\(\\) expects array\\|string, mixed given\\.$#" + message: "#^Parameter \\#1 \\$name of class PhpMyAdmin\\\\Table constructor expects string, mixed given\\.$#" count: 1 path: libraries/classes/Controllers/Table/RelationController.php - - message: "#^Parameter \\#1 \\$tableName of class PhpMyAdmin\\\\Table constructor expects string, mixed given\\.$#" + message: "#^Parameter \\#1 \\$queryData of static method PhpMyAdmin\\\\Core\\:\\:previewSQL\\(\\) expects array\\|string, mixed given\\.$#" count: 1 path: libraries/classes/Controllers/Table/RelationController.php @@ -8470,6 +8470,11 @@ parameters: count: 1 path: libraries/classes/Controllers/Table/ReplaceController.php + - + message: "#^Parameter \\#1 \\$name of class PhpMyAdmin\\\\Table constructor expects string, mixed given\\.$#" + count: 1 + path: libraries/classes/Controllers/Table/ReplaceController.php + - message: "#^Parameter \\#1 \\$oneWhereClause of method PhpMyAdmin\\\\InsertEdit\\:\\:setSessionForEditNext\\(\\) expects string, mixed given\\.$#" count: 1 @@ -8510,11 +8515,6 @@ parameters: count: 1 path: libraries/classes/Controllers/Table/ReplaceController.php - - - message: "#^Parameter \\#1 \\$tableName of class PhpMyAdmin\\\\Table constructor expects string, mixed given\\.$#" - count: 1 - path: libraries/classes/Controllers/Table/ReplaceController.php - - message: "#^Parameter \\#1 \\$urlParams of method PhpMyAdmin\\\\InsertEdit\\:\\:getErrorUrl\\(\\) expects array, mixed given\\.$#" count: 1 @@ -9051,7 +9051,7 @@ parameters: path: libraries/classes/Controllers/Table/Structure/PartitioningController.php - - message: "#^Parameter \\#1 \\$tableName of class PhpMyAdmin\\\\Table constructor expects string, mixed given\\.$#" + message: "#^Parameter \\#1 \\$name of class PhpMyAdmin\\\\Table constructor expects string, mixed given\\.$#" count: 1 path: libraries/classes/Controllers/Table/Structure/PartitioningController.php @@ -13010,6 +13010,11 @@ parameters: count: 2 path: libraries/classes/Export/Export.php + - + message: "#^Parameter \\#1 \\$name of class PhpMyAdmin\\\\Table constructor expects string, mixed given\\.$#" + count: 2 + path: libraries/classes/Export/Export.php + - message: "#^Parameter \\#1 \\$params of static method PhpMyAdmin\\\\Url\\:\\:getCommonRaw\\(\\) expects array\\, array\\ given\\.$#" count: 2 @@ -13025,11 +13030,6 @@ parameters: count: 2 path: libraries/classes/Export/Export.php - - - message: "#^Parameter \\#1 \\$tableName of class PhpMyAdmin\\\\Table constructor expects string, mixed given\\.$#" - count: 2 - path: libraries/classes/Export/Export.php - - message: "#^Parameter \\#2 \\$dbAlias of method PhpMyAdmin\\\\Plugins\\\\ExportPlugin\\:\\:exportDBHeader\\(\\) expects string, mixed given\\.$#" count: 2 @@ -14945,6 +14945,11 @@ parameters: count: 1 path: libraries/classes/Import/Import.php + - + message: "#^Parameter \\#1 \\$name of class PhpMyAdmin\\\\Table constructor expects string, mixed given\\.$#" + count: 1 + path: libraries/classes/Import/Import.php + - message: "#^Parameter \\#1 \\$separator of function explode expects non\\-empty\\-string, mixed given\\.$#" count: 1 @@ -14980,11 +14985,6 @@ parameters: count: 2 path: libraries/classes/Import/Import.php - - - message: "#^Parameter \\#1 \\$tableName of class PhpMyAdmin\\\\Table constructor expects string, mixed given\\.$#" - count: 1 - path: libraries/classes/Import/Import.php - - message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#" count: 6 @@ -22640,6 +22640,11 @@ parameters: count: 4 path: libraries/classes/Query/Utilities.php + - + message: "#^Cannot access offset 'NumFavoriteTables'\\|'NumRecentTables' on mixed\\.$#" + count: 1 + path: libraries/classes/RecentFavoriteTable.php + - message: "#^Cannot access offset 'Server' on mixed\\.$#" count: 2 @@ -22675,11 +22680,6 @@ parameters: count: 4 path: libraries/classes/RecentFavoriteTable.php - - - message: "#^Cannot access offset non\\-falsy\\-string on mixed\\.$#" - count: 1 - path: libraries/classes/RecentFavoriteTable.php - - message: "#^Cannot call method fetchValue\\(\\) on mixed\\.$#" count: 1 @@ -25365,6 +25365,11 @@ parameters: count: 1 path: libraries/classes/Table/ColumnsDefinition.php + - + message: "#^Parameter \\#1 \\$name of class PhpMyAdmin\\\\Table constructor expects string, mixed given\\.$#" + count: 1 + path: libraries/classes/Table/ColumnsDefinition.php + - message: "#^Parameter \\#1 \\$str of function preg_quote expects string, mixed given\\.$#" count: 1 @@ -25380,11 +25385,6 @@ parameters: count: 1 path: libraries/classes/Table/ColumnsDefinition.php - - - message: "#^Parameter \\#1 \\$tableName of class PhpMyAdmin\\\\Table constructor expects string, mixed given\\.$#" - count: 1 - path: libraries/classes/Table/ColumnsDefinition.php - - message: "#^Parameter \\#1 \\$value of function intval expects array\\|bool\\|float\\|int\\|resource\\|string\\|null, mixed given\\.$#" count: 1 diff --git a/psalm-baseline.xml b/psalm-baseline.xml index a163cde6d3..a7f4cc00f9 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -358,7 +358,7 @@ id]]]> - baseCfg]]> + baseConfig]]>