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:
authorMaurício Meneghini Fauth <mauricio@fauth.dev>2022-09-09 15:04:21 +0300
committerMaurício Meneghini Fauth <mauricio@fauth.dev>2022-09-09 15:04:21 +0300
commit746d1696b703b626bddb1e33c76992078f8454da (patch)
tree4ffc0ceadb66dc5bb6cab91e1f1a81df72c23509 /libraries
parentd6b72de8aa4bc9e07869f75d4490d74deeb5b41a (diff)
Improve type declaration of Index::getCompareData method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/classes/Index.php17
-rw-r--r--libraries/classes/IndexColumn.php11
2 files changed, 23 insertions, 5 deletions
diff --git a/libraries/classes/Index.php b/libraries/classes/Index.php
index b664ee0d8c..94cb50b641 100644
--- a/libraries/classes/Index.php
+++ b/libraries/classes/Index.php
@@ -548,9 +548,20 @@ class Index
/**
* Gets the properties in an array for comparison purposes
*
- * @return array an array containing the properties of the index
- */
- public function getCompareData()
+ * @return array<string, array<int, array<string, int|string|null>>|string|null>
+ * @psalm-return array{
+ * Packed: string|null,
+ * Index_choice: string,
+ * columns?: list<array{
+ * Column_name: string,
+ * Seq_in_index: int,
+ * Collation: string|null,
+ * Sub_part: int|null,
+ * Null: string
+ * }>
+ * }
+ */
+ public function getCompareData(): array
{
$data = [
'Packed' => $this->packed,
diff --git a/libraries/classes/IndexColumn.php b/libraries/classes/IndexColumn.php
index 4921002f32..adfca050c8 100644
--- a/libraries/classes/IndexColumn.php
+++ b/libraries/classes/IndexColumn.php
@@ -191,9 +191,16 @@ class IndexColumn
/**
* Gets the properties in an array for comparison purposes
*
- * @return array an array containing the properties of the index column
+ * @return array<string, int|string|null>
+ * @psalm-return array{
+ * Column_name: string,
+ * Seq_in_index: int,
+ * Collation: string|null,
+ * Sub_part: int|null,
+ * Null: string
+ * }
*/
- public function getCompareData()
+ public function getCompareData(): array
{
return [
'Column_name' => $this->name,