phpstan level 2 - Fix phpdoc
Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
parent
969ad84e76
commit
bcefdd79fa
@ -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
|
||||
{
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
||||
@ -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];
|
||||
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -595,7 +595,7 @@ class File
|
||||
/**
|
||||
* Sets the file handle
|
||||
*
|
||||
* @param object $handle file handle
|
||||
* @param resource $handle file handle
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@ -416,7 +416,7 @@ class Index
|
||||
/**
|
||||
* Return the key block size
|
||||
*
|
||||
* @return number
|
||||
* @return int
|
||||
*/
|
||||
public function getKeyBlockSize()
|
||||
{
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -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()
|
||||
{
|
||||
|
||||
@ -670,7 +670,7 @@ class Menu
|
||||
*
|
||||
* @param string $table Current table
|
||||
*
|
||||
* @return $this
|
||||
* @return Menu
|
||||
*/
|
||||
public function setTable($table)
|
||||
{
|
||||
|
||||
@ -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
|
||||
*/
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -37,7 +37,7 @@ class EpsRelationSchema extends ExportRelationSchema
|
||||
*/
|
||||
private $_tables = [];
|
||||
|
||||
/** @var RelationStatsDia[] Relations */
|
||||
/** @var RelationStatsEps[] Relations */
|
||||
private $_relations = [];
|
||||
|
||||
private $_tablewidth;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
*/
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -113,7 +113,7 @@ class SubPartition
|
||||
/**
|
||||
* Return the ordinal of the partition
|
||||
*
|
||||
* @return number the ordinal
|
||||
* @return int the ordinal
|
||||
*/
|
||||
public function getOrdinal()
|
||||
{
|
||||
|
||||
@ -2686,7 +2686,7 @@ class Table
|
||||
/**
|
||||
* Returns the real row count for a table
|
||||
*
|
||||
* @return number
|
||||
* @return int
|
||||
*/
|
||||
public function getRealRowCountTable()
|
||||
{
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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
|
||||
*/
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -122,7 +122,7 @@ class TableRelationControllerTest extends PmaTestCase
|
||||
'PhpMyAdmin\Controllers\Table\TableRelationController'
|
||||
);
|
||||
/**
|
||||
* @var PhpMyAdmin\Controllers\Table\TableRelationController
|
||||
* @var \PhpMyAdmin\Controllers\Table\TableRelationController
|
||||
*/
|
||||
$ctrl = $container->get('TableRelationController');
|
||||
|
||||
|
||||
@ -24,12 +24,12 @@ class GisFactoryTest extends TestCase
|
||||
* Test factory method
|
||||
*
|
||||
* @param string $type geometry type
|
||||
* @param object $geom geometry object
|
||||
* @param string $geom geometry object
|
||||
*
|
||||
* @dataProvider providerForTestFactory
|
||||
* @return void
|
||||
*/
|
||||
public function testFactory($type, $geom)
|
||||
public function testFactory(string $type, string $geom): void
|
||||
{
|
||||
$this->assertInstanceOf($geom, GisFactory::factory($type));
|
||||
}
|
||||
@ -37,9 +37,9 @@ class GisFactoryTest extends TestCase
|
||||
/**
|
||||
* data provider for testFactory
|
||||
*
|
||||
* @return array data for testFactory
|
||||
* @return array[] data for testFactory
|
||||
*/
|
||||
public function providerForTestFactory()
|
||||
public function providerForTestFactory(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -64,7 +64,7 @@ abstract class GisGeomTestCase extends TestCase
|
||||
/**
|
||||
* Tests whether content is a valid image.
|
||||
*
|
||||
* @param object $object Image
|
||||
* @param resource $object Image
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@ -168,11 +168,11 @@ class GisLineStringTest extends GisGeomTestCase
|
||||
/**
|
||||
* test case for prepareRowAsPng() method
|
||||
*
|
||||
* @param string $spatial GIS LINESTRING object
|
||||
* @param string $label label for the GIS LINESTRING object
|
||||
* @param string $line_color color for the GIS LINESTRING object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param object $image image object
|
||||
* @param string $spatial GIS LINESTRING object
|
||||
* @param string $label label for the GIS LINESTRING object
|
||||
* @param string $line_color color for the GIS LINESTRING object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param resource $image image object
|
||||
*
|
||||
* @dataProvider providerForPrepareRowAsPng
|
||||
* @return void
|
||||
@ -228,7 +228,7 @@ class GisLineStringTest extends GisGeomTestCase
|
||||
* @param string $label label for the GIS LINESTRING object
|
||||
* @param string $line_color color for the GIS LINESTRING object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param object $pdf TCPDF instance
|
||||
* @param TCPDF $pdf TCPDF instance
|
||||
*
|
||||
* @dataProvider providerForPrepareRowAsPdf
|
||||
* @return void
|
||||
|
||||
@ -229,11 +229,11 @@ class GisMultiLineStringTest extends GisGeomTestCase
|
||||
/**
|
||||
* test case for prepareRowAsPng() method
|
||||
*
|
||||
* @param string $spatial GIS MULTILINESTRING object
|
||||
* @param string $label label for the GIS MULTILINESTRING object
|
||||
* @param string $line_color color for the GIS MULTILINESTRING object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param object $image image object
|
||||
* @param string $spatial GIS MULTILINESTRING object
|
||||
* @param string $label label for the GIS MULTILINESTRING object
|
||||
* @param string $line_color color for the GIS MULTILINESTRING object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param resource $image image object
|
||||
*
|
||||
* @return void
|
||||
* @dataProvider providerForPrepareRowAsPng
|
||||
@ -289,7 +289,7 @@ class GisMultiLineStringTest extends GisGeomTestCase
|
||||
* @param string $label label for the GIS MULTILINESTRING object
|
||||
* @param string $line_color color for the GIS MULTILINESTRING object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param object $pdf TCPDF instance
|
||||
* @param TCPDF $pdf TCPDF instance
|
||||
*
|
||||
* @return void
|
||||
* @dataProvider providerForPrepareRowAsPdf
|
||||
|
||||
@ -173,11 +173,11 @@ class GisMultiPointTest extends GisGeomTestCase
|
||||
/**
|
||||
* test case for prepareRowAsPng() method
|
||||
*
|
||||
* @param string $spatial GIS MULTIPOINT object
|
||||
* @param string $label label for the GIS MULTIPOINT object
|
||||
* @param string $point_color color for the GIS MULTIPOINT object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param object $image image object
|
||||
* @param string $spatial GIS MULTIPOINT object
|
||||
* @param string $label label for the GIS MULTIPOINT object
|
||||
* @param string $point_color color for the GIS MULTIPOINT object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param resource $image image object
|
||||
*
|
||||
* @return void
|
||||
* @dataProvider providerForPrepareRowAsPng
|
||||
@ -232,7 +232,7 @@ class GisMultiPointTest extends GisGeomTestCase
|
||||
* @param string $label label for the GIS MULTIPOINT object
|
||||
* @param string $point_color color for the GIS MULTIPOINT object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param object $pdf TCPDF instance
|
||||
* @param TCPDF $pdf TCPDF instance
|
||||
*
|
||||
* @return void
|
||||
* @dataProvider providerForPrepareRowAsPdf
|
||||
|
||||
@ -273,11 +273,11 @@ class GisMultiPolygonTest extends GisGeomTestCase
|
||||
/**
|
||||
* test case for prepareRowAsPng() method
|
||||
*
|
||||
* @param string $spatial GIS MULTIPOLYGON object
|
||||
* @param string $label label for the GIS MULTIPOLYGON object
|
||||
* @param string $fill_color color for the GIS MULTIPOLYGON object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param object $image image object
|
||||
* @param string $spatial GIS MULTIPOLYGON object
|
||||
* @param string $label label for the GIS MULTIPOLYGON object
|
||||
* @param string $fill_color color for the GIS MULTIPOLYGON object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param resource $image image object
|
||||
*
|
||||
* @return void
|
||||
* @dataProvider providerForPrepareRowAsPng
|
||||
@ -334,7 +334,7 @@ class GisMultiPolygonTest extends GisGeomTestCase
|
||||
* @param string $label label for the GIS MULTIPOLYGON object
|
||||
* @param string $fill_color color for the GIS MULTIPOLYGON object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param object $pdf TCPDF instance
|
||||
* @param TCPDF $pdf TCPDF instance
|
||||
*
|
||||
* @return void
|
||||
* @dataProvider providerForPrepareRowAsPdf
|
||||
|
||||
@ -174,11 +174,11 @@ class GisPointTest extends GisGeomTestCase
|
||||
/**
|
||||
* test case for prepareRowAsPng() method
|
||||
*
|
||||
* @param string $spatial GIS POINT object
|
||||
* @param string $label label for the GIS POINT object
|
||||
* @param string $point_color color for the GIS POINT object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param object $image image object
|
||||
* @param string $spatial GIS POINT object
|
||||
* @param string $label label for the GIS POINT object
|
||||
* @param string $point_color color for the GIS POINT object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param resource $image image object
|
||||
*
|
||||
* @return void
|
||||
* @dataProvider providerForPrepareRowAsPng
|
||||
@ -233,7 +233,7 @@ class GisPointTest extends GisGeomTestCase
|
||||
* @param string $label label for the GIS POINT object
|
||||
* @param string $point_color color for the GIS POINT object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param object $pdf TCPDF instance
|
||||
* @param TCPDF $pdf TCPDF instance
|
||||
*
|
||||
* @return void
|
||||
* @dataProvider providerForPrepareRowAsPdf
|
||||
|
||||
@ -361,11 +361,11 @@ class GisPolygonTest extends GisGeomTestCase
|
||||
/**
|
||||
* test case for prepareRowAsPng()
|
||||
*
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label label for the GIS POLYGON object
|
||||
* @param string $fill_color color for the GIS POLYGON object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param object $image image object
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param string $label label for the GIS POLYGON object
|
||||
* @param string $fill_color color for the GIS POLYGON object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param resource $image image object
|
||||
*
|
||||
* @return void
|
||||
* @dataProvider providerForPrepareRowAsPng
|
||||
@ -420,7 +420,7 @@ class GisPolygonTest extends GisGeomTestCase
|
||||
* @param string $label label for the GIS POLYGON object
|
||||
* @param string $fill_color color for the GIS POLYGON object
|
||||
* @param array $scale_data array containing data related to scaling
|
||||
* @param object $pdf TCPDF instance
|
||||
* @param TCPDF $pdf TCPDF instance
|
||||
*
|
||||
* @return void
|
||||
* @dataProvider providerForPrepareRowAsPdf
|
||||
|
||||
@ -570,7 +570,7 @@ abstract class TestBase extends TestCase
|
||||
*
|
||||
* @return void|boolean|\mysqli_result
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function dbQuery($query)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user