Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Desportes <williamdes@wdes.fr>2018-10-06 18:20:15 +0300
committerWilliam Desportes <williamdes@wdes.fr>2018-11-25 15:57:55 +0300
commitbcefdd79fa96edcf94cb01d50111840e62e4babc (patch)
treeeac1b8b465b8fbe9567fb9f8c4b67de441b2e672 /libraries
parent969ad84e76703ce0f863f24b946c8f4e823fd54e (diff)
phpstan level 2 - Fix phpdoc
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/classes/Advisor.php2
-rw-r--r--libraries/classes/Bookmark.php2
-rw-r--r--libraries/classes/Controllers/Table/TableStructureController.php2
-rw-r--r--libraries/classes/Display/Results.php300
-rw-r--r--libraries/classes/Export.php2
-rw-r--r--libraries/classes/File.php2
-rw-r--r--libraries/classes/Index.php2
-rw-r--r--libraries/classes/InsertEdit.php2
-rw-r--r--libraries/classes/LanguageManager.php8
-rw-r--r--libraries/classes/Menu.php2
-rw-r--r--libraries/classes/Message.php4
-rw-r--r--libraries/classes/Plugins/Schema/Dia/RelationStatsDia.php2
-rw-r--r--libraries/classes/Plugins/Schema/Dia/TableStatsDia.php2
-rw-r--r--libraries/classes/Plugins/Schema/Eps/EpsRelationSchema.php2
-rw-r--r--libraries/classes/Plugins/Schema/Eps/RelationStatsEps.php2
-rw-r--r--libraries/classes/Plugins/Schema/ExportRelationSchema.php4
-rw-r--r--libraries/classes/Plugins/Schema/Pdf/RelationStatsPdf.php2
-rw-r--r--libraries/classes/Plugins/Schema/RelationStats.php2
-rw-r--r--libraries/classes/Plugins/Schema/Svg/RelationStatsSvg.php2
-rw-r--r--libraries/classes/Plugins/Schema/Svg/SvgRelationSchema.php6
-rw-r--r--libraries/classes/Plugins/Schema/TableStats.php18
-rw-r--r--libraries/classes/Server/Privileges.php6
-rw-r--r--libraries/classes/Session.php4
-rw-r--r--libraries/classes/SubPartition.php2
-rw-r--r--libraries/classes/Table.php2
-rw-r--r--libraries/classes/Tracker.php6
-rw-r--r--libraries/classes/Util.php4
-rw-r--r--libraries/classes/VersionInformation.php5
28 files changed, 202 insertions, 197 deletions
diff --git a/libraries/classes/Advisor.php b/libraries/classes/Advisor.php
index 8a894b2293..9ebfac0f48 100644
--- a/libraries/classes/Advisor.php
+++ b/libraries/classes/Advisor.php
@@ -149,7 +149,7 @@ class Advisor
* @param string|int $variable Variable to set
* @param mixed $value Value to set
*
- * @return $this
+ * @return Advisor
*/
public function setVariable($variable, $value): self
{
diff --git a/libraries/classes/Bookmark.php b/libraries/classes/Bookmark.php
index 8ac0405adb..ad3055eefa 100644
--- a/libraries/classes/Bookmark.php
+++ b/libraries/classes/Bookmark.php
@@ -172,7 +172,7 @@ class Bookmark
/**
* Returns the number of variables in a bookmark
*
- * @return number number of variables
+ * @return int number of variables
*/
public function getVariableCount(): int
{
diff --git a/libraries/classes/Controllers/Table/TableStructureController.php b/libraries/classes/Controllers/Table/TableStructureController.php
index f1ccfaef24..23e2c5eeec 100644
--- a/libraries/classes/Controllers/Table/TableStructureController.php
+++ b/libraries/classes/Controllers/Table/TableStructureController.php
@@ -596,7 +596,7 @@ class TableStructureController extends TableController
$parser = new Parser($createTable);
/**
- * @var $stmt PhpMyAdmin\SqlParser\Statements\CreateStatement
+ * @var CreateStatement $stmt
*/
$stmt = $parser->statements[0];
diff --git a/libraries/classes/Display/Results.php b/libraries/classes/Display/Results.php
index a05b834be9..c42c56c0f8 100644
--- a/libraries/classes/Display/Results.php
+++ b/libraries/classes/Display/Results.php
@@ -24,6 +24,8 @@ use PhpMyAdmin\Template;
use PhpMyAdmin\Transformations;
use PhpMyAdmin\Url;
use PhpMyAdmin\Util;
+use \stdClass;
+use PhpMyAdmin\Plugins\TransformationsPlugin;
/**
* Handle all the functionalities related to displaying results
@@ -389,27 +391,27 @@ class Results
/**
* Set properties which were not initialized at the constructor
*
- * @param integer $unlim_num_rows the total number of rows returned by
- * the SQL query without any appended
- * "LIMIT" clause programmatically
- * @param array $fields_meta meta information about fields
- * @param boolean $is_count statement is SELECT COUNT
- * @param integer $is_export statement contains INTO OUTFILE
- * @param boolean $is_func statement contains a function like SUM()
- * @param integer $is_analyse statement contains PROCEDURE ANALYSE
- * @param integer $num_rows total no. of rows returned by SQL query
- * @param integer $fields_cnt total no.of fields returned by SQL query
- * @param double $querytime time taken for execute the SQL query
- * @param string $pmaThemeImage path for theme images directory
- * @param string $text_dir text direction
- * @param boolean $is_maint statement contains a maintenance command
- * @param boolean $is_explain statement contains EXPLAIN
- * @param boolean $is_show statement contains SHOW
- * @param array $showtable table definitions
- * @param string $printview print view was requested
- * @param string $url_query URL query
- * @param boolean $editable whether the results set is editable
- * @param boolean $is_browse_dist whether browsing distinct values
+ * @param integer $unlim_num_rows the total number of rows returned by
+ * the SQL query without any appended
+ * "LIMIT" clause programmatically
+ * @param stdClass $fields_meta meta information about fields
+ * @param boolean $is_count statement is SELECT COUNT
+ * @param integer $is_export statement contains INTO OUTFILE
+ * @param boolean $is_func statement contains a function like SUM()
+ * @param integer $is_analyse statement contains PROCEDURE ANALYSE
+ * @param integer $num_rows total no. of rows returned by SQL query
+ * @param integer $fields_cnt total no.of fields returned by SQL query
+ * @param double $querytime time taken for execute the SQL query
+ * @param string $pmaThemeImage path for theme images directory
+ * @param string $text_dir text direction
+ * @param boolean $is_maint statement contains a maintenance command
+ * @param boolean $is_explain statement contains EXPLAIN
+ * @param boolean $is_show statement contains SHOW
+ * @param array $showtable table definitions
+ * @param string $printview print view was requested
+ * @param string $url_query URL query
+ * @param boolean $editable whether the results set is editable
+ * @param boolean $is_browse_dist whether browsing distinct values
*
* @return void
*
@@ -1848,17 +1850,17 @@ class Results
/**
* Prepare parameters and html for sorted table header fields
*
- * @param array $fields_meta set of field properties
- * @param array $sort_expression sort expression
- * @param array $sort_expression_nodirection sort expression without direction
- * @param integer $column_index the index of the column
- * @param string $unsorted_sql_query the unsorted sql query
- * @param integer $session_max_rows maximum rows resulted by sql
- * @param string $comments comment for row
- * @param array $sort_direction sort direction
- * @param boolean $col_visib column is visible(false)
- * array column isn't visible(string array)
- * @param string $col_visib_j element of $col_visib array
+ * @param stdClass $fields_meta set of field properties
+ * @param array $sort_expression sort expression
+ * @param array $sort_expression_nodirection sort expression without direction
+ * @param integer $column_index the index of the column
+ * @param string $unsorted_sql_query the unsorted sql query
+ * @param integer $session_max_rows maximum rows resulted by sql
+ * @param string $comments comment for row
+ * @param array $sort_direction sort direction
+ * @param boolean $col_visib column is visible(false)
+ * array column isn't visible(string array)
+ * @param string $col_visib_j element of $col_visib array
*
* @return array 2 element array - $order_link, $sorted_header_html
*
@@ -1964,15 +1966,15 @@ class Results
/**
* Prepare parameters and html for sorted table header fields
*
- * @param array $sort_expression sort expression
- * @param array $sort_expression_nodirection sort expression without direction
- * @param string $sort_tbl The name of the table to which
+ * @param array $sort_expression sort expression
+ * @param array $sort_expression_nodirection sort expression without direction
+ * @param string $sort_tbl The name of the table to which
* the current column belongs to
- * @param string $name_to_use_in_sort The current column under
+ * @param string $name_to_use_in_sort The current column under
* consideration
- * @param array $sort_direction sort direction
- * @param array $fields_meta set of field properties
- * @param integer $column_index The index number to current column
+ * @param array $sort_direction sort direction
+ * @param stdClass $fields_meta set of field properties
+ * @param integer $column_index The index number to current column
*
* @return array 3 element array - $single_sort_order, $sort_order, $order_img
*
@@ -2234,10 +2236,10 @@ class Results
/**
* Get sort order link
*
- * @param string $order_img the sort order image
- * @param array $fields_meta set of field properties
- * @param string $order_url the url for sort
- * @param string $multi_order_url the url for sort
+ * @param string $order_img the sort order image
+ * @param stdClass $fields_meta set of field properties
+ * @param string $order_url the url for sort
+ * @param string $multi_order_url the url for sort
*
* @return string the sort order link
*
@@ -2270,8 +2272,8 @@ class Results
* Check if the column contains numeric data. If yes, then set the
* column header's alignment right
*
- * @param array $fields_meta set of field properties
- * @param array &$th_class array containing classes
+ * @param stdClass $fields_meta set of field properties
+ * @param array &$th_class array containing classes
*
* @return void
*
@@ -2290,12 +2292,12 @@ class Results
/**
* Prepare columns to draggable effect for sortable columns
*
- * @param boolean $col_visib the column is visible (false)
- * array the column is not visible (string array)
- * @param string $col_visib_j element of $col_visib array
- * @param array $fields_meta set of field properties
- * @param string $order_link the order link
- * @param string $comments the comment for the column
+ * @param boolean $col_visib the column is visible (false)
+ * array the column is not visible (string array)
+ * @param string $col_visib_j element of $col_visib array
+ * @param stdClass $fields_meta set of field properties
+ * @param string $order_link the order link
+ * @param string $comments the comment for the column
*
* @return string html content
*
@@ -2340,12 +2342,12 @@ class Results
/**
* Prepare columns to draggable effect for non sortable columns
*
- * @param boolean $col_visib the column is visible (false)
- * array the column is not visible (string array)
- * @param string $col_visib_j element of $col_visib array
- * @param boolean $condition_field whether to add CSS class condition
- * @param array $fields_meta set of field properties
- * @param string $comments the comment for the column
+ * @param boolean $col_visib the column is visible (false)
+ * array the column is not visible (string array)
+ * @param string $col_visib_j element of $col_visib array
+ * @param boolean $condition_field whether to add CSS class condition
+ * @param stdClass $fields_meta set of field properties
+ * @param string $comments the comment for the column
*
* @return string html content
*
@@ -2473,10 +2475,10 @@ class Results
/**
* Prepares the display for a null value
*
- * @param string $class class of table cell
- * @param bool $conditionField whether to add CSS class condition
- * @param object $meta the meta-information about this field
- * @param string $align cell alignment
+ * @param string $class class of table cell
+ * @param bool $conditionField whether to add CSS class condition
+ * @param stdClass $meta the meta-information about this field
+ * @param string $align cell alignment
*
* @return string the td
*
@@ -2500,10 +2502,10 @@ class Results
/**
* Prepares the display for an empty value
*
- * @param string $class class of table cell
- * @param bool $conditionField whether to add CSS class condition
- * @param object $meta the meta-information about this field
- * @param string $align cell alignment
+ * @param string $class class of table cell
+ * @param bool $conditionField whether to add CSS class condition
+ * @param stdClass $meta the meta-information about this field
+ * @param string $align cell alignment
*
* @return string the td
*
@@ -2526,19 +2528,19 @@ class Results
/**
* Adds the relevant classes.
*
- * @param string $class class of table cell
- * @param bool $condition_field whether to add CSS class
- * condition
- * @param object $meta the meta-information about the
- * field
- * @param string $nowrap avoid wrapping
- * @param bool $is_field_truncated is field truncated (display ...)
- * @param object|string $transformation_plugin transformation plugin.
- * Can also be the default function:
- * Core::mimeDefaultFunction
- * @param string $default_function default transformation function
+ * @param string $class class of table cell
+ * @param bool $condition_field whether to add CSS class
+ * condition
+ * @param stdClass $meta the meta-information about the
+ * field
+ * @param string $nowrap avoid wrapping
+ * @param bool $is_field_truncated is field truncated (display ...)
+ * @param TransformationsPlugin $transformation_plugin transformation plugin.
+ * Can also be the default function:
+ * Core::mimeDefaultFunction
+ * @param string $default_function default transformation function
*
- * @return string the list of classes
+ * @return string the list of classes
*
* @access private
*
@@ -3734,20 +3736,20 @@ class Results
/**
* Prepare data cell for numeric type fields
*
- * @param string|null $column the column's value
- * @param string $class the html class for column
- * @param boolean $condition_field the column should highlighted
- * or not
- * @param object $meta the meta-information about this
- * field
- * @param array $map the list of relations
- * @param boolean $is_field_truncated the condition for blob data
- * replacements
- * @param array $analyzed_sql_results the analyzed query
- * @param object|string $transformation_plugin the name of transformation plugin
- * @param string $default_function the default transformation
- * function
- * @param array $transform_options the transformation parameters
+ * @param string|null $column the column's value
+ * @param string $class the html class for column
+ * @param boolean $condition_field the column should highlighted
+ * or not
+ * @param stdClass $meta the meta-information about this
+ * field
+ * @param array $map the list of relations
+ * @param boolean $is_field_truncated the condition for blob data
+ * replacements
+ * @param array $analyzed_sql_results the analyzed query
+ * @param TransformationsPlugin $transformation_plugin the name of transformation plugin
+ * @param string $default_function the default transformation
+ * function
+ * @param array $transform_options the transformation parameters
*
* @return string the prepared cell, html content
*
@@ -3810,24 +3812,24 @@ class Results
/**
* Get data cell for geometry type fields
*
- * @param string|null $column the relevant column in data row
- * @param string $class the html class for column
- * @param object $meta the meta-information about
- * this field
- * @param array $map the list of relations
- * @param array $_url_params the parameters for generate url
- * @param boolean $condition_field the column should highlighted
- * or not
- * @param object|string $transformation_plugin the name of transformation
+ * @param string|null $column the relevant column in data row
+ * @param string $class the html class for column
+ * @param stdClass $meta the meta-information about
+ * this field
+ * @param array $map the list of relations
+ * @param array $_url_params the parameters for generate url
+ * @param boolean $condition_field the column should highlighted
+ * or not
+ * @param TransformationsPlugin $transformation_plugin the name of transformation
* function
- * @param string $default_function the default transformation
- * function
- * @param string $transform_options the transformation parameters
- * @param array $analyzed_sql_results the analyzed query
+ * @param string $default_function the default transformation
+ * function
+ * @param string $transform_options the transformation parameters
+ * @param array $analyzed_sql_results the analyzed query
*
- * @return string the prepared data cell, html content
+ * @return string the prepared data cell, html content
*
- * @access private
+ * @access private
*
* @see _getTableBody()
*/
@@ -3956,27 +3958,27 @@ class Results
/**
* Get data cell for non numeric type fields
*
- * @param string|null $column the relevant column in data row
- * @param string $class the html class for column
- * @param object $meta the meta-information about
- * the field
- * @param array $map the list of relations
- * @param array $_url_params the parameters for generate
- * url
- * @param boolean $condition_field the column should highlighted
- * or not
- * @param object|string $transformation_plugin the name of transformation
- * function
- * @param string $default_function the default transformation
- * function
- * @param string $transform_options the transformation parameters
- * @param boolean $is_field_truncated is data truncated due to
- * LimitChars
- * @param array $analyzed_sql_results the analyzed query
- * @param integer &$dt_result the link id associated to
- * the query which results
- * have to be displayed
- * @param integer $col_index the column index
+ * @param string|null $column the relevant column in data row
+ * @param string $class the html class for column
+ * @param stdClass $meta the meta-information about
+ * the field
+ * @param array $map the list of relations
+ * @param array $_url_params the parameters for generate
+ * url
+ * @param boolean $condition_field the column should highlighted
+ * or not
+ * @param TransformationsPlugin $transformation_plugin the name of transformation
+ * function
+ * @param string $default_function the default transformation
+ * function
+ * @param string $transform_options the transformation parameters
+ * @param boolean $is_field_truncated is data truncated due to
+ * LimitChars
+ * @param array $analyzed_sql_results the analyzed query
+ * @param integer &$dt_result the link id associated to
+ * the query which results
+ * have to be displayed
+ * @param integer $col_index the column index
*
* @return string the prepared data cell, html content
*
@@ -5324,7 +5326,7 @@ class Results
* Core::mimeDefaultFunction
* @param string $transform_options transformation parameters
* @param string $default_function default transformation function
- * @param object $meta the meta-information about the field
+ * @param stdClass $meta the meta-information about the field
* @param array $url_params parameters that should go to the
* download link
* @param boolean &$is_truncated the result is truncated or not
@@ -5433,9 +5435,9 @@ class Results
/**
* Retrieves the associated foreign key info for a data cell
*
- * @param array $map the list of relations
- * @param object $meta the meta-information about the field
- * @param string $where_comparison data for the where clause
+ * @param array $map the list of relations
+ * @param stdClass $meta the meta-information about the field
+ * @param string $where_comparison data for the where clause
*
* @return string formatted data
*
@@ -5475,24 +5477,24 @@ class Results
* Prepares the displayable content of a data cell in Browse mode,
* taking into account foreign key description field and transformations
*
- * @param string $class css classes for the td element
- * @param bool $condition_field whether the column is a part of
- * the where clause
- * @param array $analyzed_sql_results the analyzed query
- * @param object $meta the meta-information about the
- * field
- * @param array $map the list of relations
- * @param string $data data
- * @param object|string $transformation_plugin transformation plugin.
- * Can also be the default function:
- * Core::mimeDefaultFunction
- * @param string $default_function default function
- * @param string $nowrap 'nowrap' if the content should
- * not be wrapped
- * @param string $where_comparison data for the where clause
- * @param array $transform_options options for transformation
- * @param bool $is_field_truncated whether the field is truncated
- * @param string $original_length of a truncated column, or ''
+ * @param string $class css classes for the td element
+ * @param bool $condition_field whether the column is a part of
+ * the where clause
+ * @param array $analyzed_sql_results the analyzed query
+ * @param stdClass $meta the meta-information about the
+ * field
+ * @param array $map the list of relations
+ * @param string $data data
+ * @param TransformationsPlugin $transformation_plugin transformation plugin.
+ * Can also be the default function:
+ * Core::mimeDefaultFunction
+ * @param string $default_function default function
+ * @param string $nowrap 'nowrap' if the content should
+ * not be wrapped
+ * @param string $where_comparison data for the where clause
+ * @param array $transform_options options for transformation
+ * @param bool $is_field_truncated whether the field is truncated
+ * @param string $original_length of a truncated column, or ''
*
* @return string formatted data
*
diff --git a/libraries/classes/Export.php b/libraries/classes/Export.php
index 305bb8f94d..4022db6942 100644
--- a/libraries/classes/Export.php
+++ b/libraries/classes/Export.php
@@ -426,7 +426,7 @@ class Export
* @param string $compression the compression mode
* @param string $filename the filename
*
- * @return object a message object (or empty string)
+ * @return array|string|bool
*/
public function compress($dump_buffer, string $compression, string $filename)
{
diff --git a/libraries/classes/File.php b/libraries/classes/File.php
index 11d834c1f7..cc17082c72 100644
--- a/libraries/classes/File.php
+++ b/libraries/classes/File.php
@@ -595,7 +595,7 @@ class File
/**
* Sets the file handle
*
- * @param object $handle file handle
+ * @param resource $handle file handle
*
* @return void
*/
diff --git a/libraries/classes/Index.php b/libraries/classes/Index.php
index 39b82b21e9..f08efb3d01 100644
--- a/libraries/classes/Index.php
+++ b/libraries/classes/Index.php
@@ -416,7 +416,7 @@ class Index
/**
* Return the key block size
*
- * @return number
+ * @return int
*/
public function getKeyBlockSize()
{
diff --git a/libraries/classes/InsertEdit.php b/libraries/classes/InsertEdit.php
index 5105241c2c..c3ee295191 100644
--- a/libraries/classes/InsertEdit.php
+++ b/libraries/classes/InsertEdit.php
@@ -231,7 +231,7 @@ class InsertEdit
* @param string $table name of the table
* @param string $db name of the database
*
- * @return array containing $result and $rows arrays
+ * @return array containing $result and $rows arrays
*/
private function loadFirstRow($table, $db)
{
diff --git a/libraries/classes/LanguageManager.php b/libraries/classes/LanguageManager.php
index 07ea996db1..9302897be4 100644
--- a/libraries/classes/LanguageManager.php
+++ b/libraries/classes/LanguageManager.php
@@ -755,7 +755,7 @@ class LanguageManager
/**
* Returns (cached) list of all available languages
*
- * @return array of Language objects
+ * @return Language[] array of Language objects
*/
public function availableLanguages()
{
@@ -791,7 +791,7 @@ class LanguageManager
* Returns (cached) list of all available languages sorted
* by name
*
- * @return array of Language objects
+ * @return Language[] array of Language objects
*/
public function sortedLanguages()
{
@@ -807,7 +807,7 @@ class LanguageManager
*
* @param string $code Language code
*
- * @return object|false Language object or false on failure
+ * @return Language|false Language object or false on failure
*/
public function getLanguage($code)
{
@@ -822,7 +822,7 @@ class LanguageManager
/**
* Return currently active Language object
*
- * @return object Language object
+ * @return Language Language object
*/
public function getCurrentLanguage()
{
diff --git a/libraries/classes/Menu.php b/libraries/classes/Menu.php
index 41b21d7d1f..65e8ede30e 100644
--- a/libraries/classes/Menu.php
+++ b/libraries/classes/Menu.php
@@ -670,7 +670,7 @@ class Menu
*
* @param string $table Current table
*
- * @return $this
+ * @return Menu
*/
public function setTable($table)
{
diff --git a/libraries/classes/Message.php b/libraries/classes/Message.php
index e2d9004426..8fbc65f861 100644
--- a/libraries/classes/Message.php
+++ b/libraries/classes/Message.php
@@ -516,8 +516,8 @@ class Message
/**
* Real implementation of adding message
*
- * @param mixed $message to be added
- * @param string $separator to use between this and previous string/message
+ * @param Message $message to be added
+ * @param string $separator to use between this and previous string/message
*
* @return void
*/
diff --git a/libraries/classes/Plugins/Schema/Dia/RelationStatsDia.php b/libraries/classes/Plugins/Schema/Dia/RelationStatsDia.php
index 89172d3075..8e17531b48 100644
--- a/libraries/classes/Plugins/Schema/Dia/RelationStatsDia.php
+++ b/libraries/classes/Plugins/Schema/Dia/RelationStatsDia.php
@@ -40,7 +40,7 @@ class RelationStatsDia
/**
* The "PhpMyAdmin\Plugins\Schema\Dia\RelationStatsDia" constructor
*
- * @param object $diagram The DIA diagram
+ * @param Dia $diagram The DIA diagram
* @param string $master_table The master table name
* @param string $master_field The relation field in the master table
* @param string $foreign_table The foreign table name
diff --git a/libraries/classes/Plugins/Schema/Dia/TableStatsDia.php b/libraries/classes/Plugins/Schema/Dia/TableStatsDia.php
index 1682f5e065..816483f325 100644
--- a/libraries/classes/Plugins/Schema/Dia/TableStatsDia.php
+++ b/libraries/classes/Plugins/Schema/Dia/TableStatsDia.php
@@ -30,7 +30,7 @@ class TableStatsDia extends TableStats
/**
* The "PhpMyAdmin\Plugins\Schema\Dia\TableStatsDia" constructor
*
- * @param object $diagram The current dia document
+ * @param Dia $diagram The current dia document
* @param string $db The database name
* @param string $tableName The table name
* @param integer $pageNumber The current page number (from the
diff --git a/libraries/classes/Plugins/Schema/Eps/EpsRelationSchema.php b/libraries/classes/Plugins/Schema/Eps/EpsRelationSchema.php
index 3d925f0d1f..7c1ac5d119 100644
--- a/libraries/classes/Plugins/Schema/Eps/EpsRelationSchema.php
+++ b/libraries/classes/Plugins/Schema/Eps/EpsRelationSchema.php
@@ -37,7 +37,7 @@ class EpsRelationSchema extends ExportRelationSchema
*/
private $_tables = [];
- /** @var RelationStatsDia[] Relations */
+ /** @var RelationStatsEps[] Relations */
private $_relations = [];
private $_tablewidth;
diff --git a/libraries/classes/Plugins/Schema/Eps/RelationStatsEps.php b/libraries/classes/Plugins/Schema/Eps/RelationStatsEps.php
index 6b58c994c3..4c501318a4 100644
--- a/libraries/classes/Plugins/Schema/Eps/RelationStatsEps.php
+++ b/libraries/classes/Plugins/Schema/Eps/RelationStatsEps.php
@@ -28,7 +28,7 @@ class RelationStatsEps extends RelationStats
/**
* The "PhpMyAdmin\Plugins\Schema\Eps\RelationStatsEps" constructor
*
- * @param object $diagram The EPS diagram
+ * @param Eps $diagram The EPS diagram
* @param string $master_table The master table name
* @param string $master_field The relation field in the master table
* @param string $foreign_table The foreign table name
diff --git a/libraries/classes/Plugins/Schema/ExportRelationSchema.php b/libraries/classes/Plugins/Schema/ExportRelationSchema.php
index a73ebca20f..ab3233a531 100644
--- a/libraries/classes/Plugins/Schema/ExportRelationSchema.php
+++ b/libraries/classes/Plugins/Schema/ExportRelationSchema.php
@@ -42,8 +42,8 @@ class ExportRelationSchema
/**
* Constructor.
*
- * @param string $db database name
- * @param object $diagram schema diagram
+ * @param string $db database name
+ * @param Pdf\Pdf|Svg\Svg|Eps\Eps|Dia\Dia|Pdf\Pdf|null $diagram schema diagram
*/
public function __construct($db, $diagram)
{
diff --git a/libraries/classes/Plugins/Schema/Pdf/RelationStatsPdf.php b/libraries/classes/Plugins/Schema/Pdf/RelationStatsPdf.php
index f44f29149f..4495e847d3 100644
--- a/libraries/classes/Plugins/Schema/Pdf/RelationStatsPdf.php
+++ b/libraries/classes/Plugins/Schema/Pdf/RelationStatsPdf.php
@@ -29,7 +29,7 @@ class RelationStatsPdf extends RelationStats
/**
* The "PhpMyAdmin\Plugins\Schema\Pdf\RelationStatsPdf" constructor
*
- * @param object $diagram The PDF diagram
+ * @param Pdf $diagram The PDF diagram
* @param string $master_table The master table name
* @param string $master_field The relation field in the master table
* @param string $foreign_table The foreign table name
diff --git a/libraries/classes/Plugins/Schema/RelationStats.php b/libraries/classes/Plugins/Schema/RelationStats.php
index e2e6ddf7f9..4a172878f3 100644
--- a/libraries/classes/Plugins/Schema/RelationStats.php
+++ b/libraries/classes/Plugins/Schema/RelationStats.php
@@ -97,7 +97,7 @@ abstract class RelationStats
/**
* Gets arrows coordinates
*
- * @param string $table The current table name
+ * @param \PhpMyAdmin\Plugins\Schema\TableStats $table The table
* @param string $column The relation column name
*
* @return array Arrows coordinates
diff --git a/libraries/classes/Plugins/Schema/Svg/RelationStatsSvg.php b/libraries/classes/Plugins/Schema/Svg/RelationStatsSvg.php
index b68f0cd082..2e323fc2fb 100644
--- a/libraries/classes/Plugins/Schema/Svg/RelationStatsSvg.php
+++ b/libraries/classes/Plugins/Schema/Svg/RelationStatsSvg.php
@@ -28,7 +28,7 @@ class RelationStatsSvg extends RelationStats
/**
* The "PhpMyAdmin\Plugins\Schema\Svg\RelationStatsSvg" constructor
*
- * @param object $diagram The SVG diagram
+ * @param Svg $diagram The SVG diagram
* @param string $master_table The master table name
* @param string $master_field The relation field in the master table
* @param string $foreign_table The foreign table name
diff --git a/libraries/classes/Plugins/Schema/Svg/SvgRelationSchema.php b/libraries/classes/Plugins/Schema/Svg/SvgRelationSchema.php
index f167f02417..e24542fa85 100644
--- a/libraries/classes/Plugins/Schema/Svg/SvgRelationSchema.php
+++ b/libraries/classes/Plugins/Schema/Svg/SvgRelationSchema.php
@@ -36,10 +36,10 @@ use PhpMyAdmin\Relation;
class SvgRelationSchema extends ExportRelationSchema
{
/**
- * @var \PhpMyAdmin\Plugins\Schema\Dia\TableStatsDia[]|TableStatsEps[]|TableStatsPdf[]|TableStatsSvg[]
+ * @var TableStatsDia[]|TableStatsEps[]|TableStatsPdf[]|TableStatsSvg[]
*/
private $_tables = [];
- /** @var RelationStatsDia[] Relations */
+ /** @var RelationStatsSvg[] Relations */
private $_relations = [];
private $_xMax = 0;
private $_yMax = 0;
@@ -178,7 +178,7 @@ class SvgRelationSchema extends ExportRelationSchema
/**
* Sets X and Y minimum and maximum for a table cell
*
- * @param string $table The table name
+ * @param \PhpMyAdmin\Plugins\Schema\TableStats $table The table
*
* @return void
*/
diff --git a/libraries/classes/Plugins/Schema/TableStats.php b/libraries/classes/Plugins/Schema/TableStats.php
index c0a15f3724..5bbffc451d 100644
--- a/libraries/classes/Plugins/Schema/TableStats.php
+++ b/libraries/classes/Plugins/Schema/TableStats.php
@@ -54,15 +54,15 @@ abstract class TableStats
/**
* Constructor
*
- * @param object $diagram schema diagram
- * @param string $db current db name
- * @param integer $pageNumber current page number (from the
- * $cfg['Servers'][$i]['table_coords'] table)
- * @param string $tableName table name
- * @param boolean $showKeys whether to display keys or not
- * @param boolean $tableDimension whether to display table position or not
- * @param boolean $offline whether the coordinates are sent
- * from the browser
+ * @param Pdf\Pdf|Svg\Svg|Eps\Eps|Dia\Dia|Pdf\Pdf $diagram schema diagram
+ * @param string $db current db name
+ * @param integer $pageNumber current page number (from the
+ * $cfg['Servers'][$i]['table_coords'] table)
+ * @param string $tableName table name
+ * @param boolean $showKeys whether to display keys or not
+ * @param boolean $tableDimension whether to display table position or not
+ * @param boolean $offline whether the coordinates are sent
+ * from the browser
*/
public function __construct(
$diagram,
diff --git a/libraries/classes/Server/Privileges.php b/libraries/classes/Server/Privileges.php
index 48c5594694..3eb0806b7e 100644
--- a/libraries/classes/Server/Privileges.php
+++ b/libraries/classes/Server/Privileges.php
@@ -1950,12 +1950,12 @@ class Privileges
* @param string $username username
* @param string $hostname hostname
*
- * @return string success or error message after updating password
+ * @return Message success or error message after updating password
*/
public function updatePassword($err_url, $username, $hostname)
{
// similar logic in user_password.php
- $message = '';
+ $message = null;
if (empty($_REQUEST['nopass'])
&& isset($_POST['pma_pw'])
@@ -1969,7 +1969,7 @@ class Privileges
}
// here $nopass could be == 1
- if (empty($message)) {
+ if ($message === null) {
$hashing_function = 'PASSWORD';
$serverType = Util::getServerType();
$serverVersion = $this->dbi->getVersion();
diff --git a/libraries/classes/Session.php b/libraries/classes/Session.php
index e82120bc54..b43e80247b 100644
--- a/libraries/classes/Session.php
+++ b/libraries/classes/Session.php
@@ -108,8 +108,8 @@ class Session
/**
* Set up session
*
- * @param PhpMyAdmin\Config $config Configuration handler
- * @param PhpMyAdmin\ErrorHandler $errorHandler Error handler
+ * @param Config $config Configuration handler
+ * @param ErrorHandler $errorHandler Error handler
* @return void
*/
public static function setUp(Config $config, ErrorHandler $errorHandler)
diff --git a/libraries/classes/SubPartition.php b/libraries/classes/SubPartition.php
index 9149d4fcc7..a5eac8b13d 100644
--- a/libraries/classes/SubPartition.php
+++ b/libraries/classes/SubPartition.php
@@ -113,7 +113,7 @@ class SubPartition
/**
* Return the ordinal of the partition
*
- * @return number the ordinal
+ * @return int the ordinal
*/
public function getOrdinal()
{
diff --git a/libraries/classes/Table.php b/libraries/classes/Table.php
index d9837eeeab..8d42053c49 100644
--- a/libraries/classes/Table.php
+++ b/libraries/classes/Table.php
@@ -2686,7 +2686,7 @@ class Table
/**
* Returns the real row count for a table
*
- * @return number
+ * @return int
*/
public function getRealRowCountTable()
{
diff --git a/libraries/classes/Tracker.php b/libraries/classes/Tracker.php
index 678d946f61..877a3bf5cc 100644
--- a/libraries/classes/Tracker.php
+++ b/libraries/classes/Tracker.php
@@ -200,8 +200,10 @@ class Tracker
= $GLOBALS['cfg']['Server']['tracking_default_statements'];
}
- // get Export SQL instance
- /* @var $export_sql_plugin PhpMyAdmin\Plugins\Export\ExportSql */
+ /**
+ * get Export SQL instance
+ * @var ExportSql $export_sql_plugin
+ */
$export_sql_plugin = Plugins::getPlugin(
"export",
"sql",
diff --git a/libraries/classes/Util.php b/libraries/classes/Util.php
index d985a14604..fd17626050 100644
--- a/libraries/classes/Util.php
+++ b/libraries/classes/Util.php
@@ -2128,8 +2128,8 @@ class Util
/**
* Generate the charset query part
*
- * @param string $collation Collation
- * @param boolean optional $override force 'CHARACTER SET' keyword
+ * @param string $collation Collation
+ * @param boolean $override (optional) force 'CHARACTER SET' keyword
*
* @return string
*/
diff --git a/libraries/classes/VersionInformation.php b/libraries/classes/VersionInformation.php
index f8eaf7209d..59c231ece4 100644
--- a/libraries/classes/VersionInformation.php
+++ b/libraries/classes/VersionInformation.php
@@ -11,6 +11,7 @@ namespace PhpMyAdmin;
use PhpMyAdmin\Util;
use PhpMyAdmin\Utils\HttpRequest;
+use \stdClass;
/**
* Responsible for retrieving version information and notifiying about latest version
@@ -23,9 +24,9 @@ class VersionInformation
/**
* Returns information with latest version from phpmyadmin.net
*
- * @return object JSON decoded object with the data
+ * @return stdClass|null JSON decoded object with the data
*/
- public function getLatestVersion()
+ public function getLatestVersion(): ?stdClass
{
if (!$GLOBALS['cfg']['VersionCheck']) {
return null;