Merge pull request #19652 from MauricioFauth/indexes

Move indexes classes to the Indexes namespace
This commit is contained in:
Maurício Meneghini Fauth 2025-03-31 18:44:18 -03:00 committed by GitHub
commit 8dce3ac0c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
28 changed files with 80 additions and 75 deletions

View File

@ -3934,7 +3934,7 @@ parameters:
path: src/Controllers/Table/RelationController.php
-
message: '#^Parameter \#2 \$table of static method PhpMyAdmin\\Index\:\:getPrimary\(\) expects string, mixed given\.$#'
message: '#^Parameter \#2 \$table of static method PhpMyAdmin\\Indexes\\Index\:\:getPrimary\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Controllers/Table/RelationController.php
@ -3958,7 +3958,7 @@ parameters:
path: src/Controllers/Table/RelationController.php
-
message: '#^Parameter \#3 \$schema of static method PhpMyAdmin\\Index\:\:getPrimary\(\) expects string, mixed given\.$#'
message: '#^Parameter \#3 \$schema of static method PhpMyAdmin\\Indexes\\Index\:\:getPrimary\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Controllers/Table/RelationController.php
@ -8569,7 +8569,7 @@ parameters:
message: '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\.$#'
identifier: foreach.nonIterable
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '''
@ -8578,139 +8578,139 @@ parameters:
'''
identifier: staticMethod.deprecated
count: 3
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Cannot access offset mixed on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Cannot cast mixed to int\.$#'
identifier: cast.int
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Only booleans are allowed in &&, int\<0, 1\> given on the left side\.$#'
identifier: booleanAnd.leftNotBoolean
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Only booleans are allowed in &&, int\<0, 2\> given on the left side\.$#'
identifier: booleanAnd.leftNotBoolean
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Only booleans are allowed in &&, int\<0, 4\> given on the left side\.$#'
identifier: booleanAnd.leftNotBoolean
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Only booleans are allowed in &&, int\<0, 8\> given on the left side\.$#'
identifier: booleanAnd.leftNotBoolean
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Parameter \#1 \$columns of method PhpMyAdmin\\Index\:\:addColumns\(\) expects array\<mixed\>, mixed given\.$#'
message: '#^Parameter \#1 \$columns of method PhpMyAdmin\\Indexes\\Index\:\:addColumns\(\) expects array\<mixed\>, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Parameter \#1 \$params of method PhpMyAdmin\\Index\:\:addColumn\(\) expects array\<string, string\|null\>, mixed given\.$#'
message: '#^Parameter \#1 \$params of method PhpMyAdmin\\Indexes\\Index\:\:addColumn\(\) expects array\<string, string\|null\>, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Property PhpMyAdmin\\Index\:\:\$choice \(string\) does not accept mixed\.$#'
message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$choice \(string\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Property PhpMyAdmin\\Index\:\:\$comment \(string\) does not accept mixed\.$#'
message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$comment \(string\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Property PhpMyAdmin\\Index\:\:\$name \(string\) does not accept mixed\.$#'
message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$name \(string\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Property PhpMyAdmin\\Index\:\:\$packed \(string\|null\) does not accept mixed\.$#'
message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$packed \(string\|null\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Property PhpMyAdmin\\Index\:\:\$parser \(string\) does not accept mixed\.$#'
message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$parser \(string\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Property PhpMyAdmin\\Index\:\:\$remarks \(string\) does not accept mixed\.$#'
message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$remarks \(string\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Property PhpMyAdmin\\Index\:\:\$schema \(string\) does not accept mixed\.$#'
message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$schema \(string\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Property PhpMyAdmin\\Index\:\:\$table \(string\) does not accept mixed\.$#'
message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$table \(string\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Property PhpMyAdmin\\Index\:\:\$type \(string\) does not accept mixed\.$#'
message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$type \(string\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Index.php
path: src/Indexes/Index.php
-
message: '#^Cannot cast mixed to int\.$#'
identifier: cast.int
count: 3
path: src/IndexColumn.php
path: src/Indexes/IndexColumn.php
-
message: '#^Property PhpMyAdmin\\IndexColumn\:\:\$collation \(string\|null\) does not accept mixed\.$#'
message: '#^Property PhpMyAdmin\\Indexes\\IndexColumn\:\:\$collation \(string\|null\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/IndexColumn.php
path: src/Indexes/IndexColumn.php
-
message: '#^Property PhpMyAdmin\\IndexColumn\:\:\$expression \(string\|null\) does not accept mixed\.$#'
message: '#^Property PhpMyAdmin\\Indexes\\IndexColumn\:\:\$expression \(string\|null\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/IndexColumn.php
path: src/Indexes/IndexColumn.php
-
message: '#^Property PhpMyAdmin\\IndexColumn\:\:\$name \(string\) does not accept mixed\.$#'
message: '#^Property PhpMyAdmin\\Indexes\\IndexColumn\:\:\$name \(string\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/IndexColumn.php
path: src/Indexes/IndexColumn.php
-
message: '#^Property PhpMyAdmin\\IndexColumn\:\:\$null \(string\) does not accept mixed\.$#'
message: '#^Property PhpMyAdmin\\Indexes\\IndexColumn\:\:\$null \(string\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/IndexColumn.php
path: src/Indexes/IndexColumn.php
-
message: '#^Binary operation "\." between non\-falsy\-string and mixed results in an error\.$#'
@ -9547,13 +9547,13 @@ parameters:
path: src/Normalization.php
-
message: '#^Parameter \#2 \$table of static method PhpMyAdmin\\Index\:\:getPrimary\(\) expects string, \(int\|string\) given\.$#'
message: '#^Parameter \#2 \$table of static method PhpMyAdmin\\Indexes\\Index\:\:getPrimary\(\) expects string, \(int\|string\) given\.$#'
identifier: argument.type
count: 1
path: src/Normalization.php
-
message: '#^Parameter \#2 \$table of static method PhpMyAdmin\\Index\:\:getPrimary\(\) expects string, mixed given\.$#'
message: '#^Parameter \#2 \$table of static method PhpMyAdmin\\Indexes\\Index\:\:getPrimary\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Normalization.php
@ -18991,13 +18991,13 @@ parameters:
message: '#^Cannot access an offset on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 3
path: tests/unit/IndexTest.php
path: tests/unit/Indexes/IndexTest.php
-
message: '#^Parameter \#1 \$columns of method PhpMyAdmin\\Index\:\:addColumns\(\) expects array\<mixed\>, mixed given\.$#'
message: '#^Parameter \#1 \$columns of method PhpMyAdmin\\Indexes\\Index\:\:addColumns\(\) expects array\<mixed\>, mixed given\.$#'
identifier: argument.type
count: 2
path: tests/unit/IndexTest.php
path: tests/unit/Indexes/IndexTest.php
-
message: '''

View File

@ -5258,7 +5258,7 @@
<code><![CDATA[ImportSettings::$runQuery]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Index.php">
<file src="src/Indexes/Index.php">
<DeprecatedMethod>
<code><![CDATA[DatabaseInterface::getInstance()]]></code>
<code><![CDATA[DatabaseInterface::getInstance()]]></code>
@ -5294,7 +5294,7 @@
<code><![CDATA[isPacked]]></code>
</PossiblyUnusedMethod>
</file>
<file src="src/IndexColumn.php">
<file src="src/Indexes/IndexColumn.php">
<MixedAssignment>
<code><![CDATA[$this->collation]]></code>
<code><![CDATA[$this->expression]]></code>
@ -11546,7 +11546,7 @@
<code><![CDATA[providerContentWithByteOrderMarks]]></code>
</PossiblyUnusedMethod>
</file>
<file src="tests/unit/IndexTest.php">
<file src="tests/unit/Indexes/IndexTest.php">
<MixedArgument>
<code><![CDATA[$this->params['columns']]]></code>
<code><![CDATA[$this->params['columns']]]></code>

View File

@ -10,7 +10,7 @@ use PhpMyAdmin\Current;
use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\Http\Response;
use PhpMyAdmin\Http\ServerRequest;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\ResponseRenderer;
use PhpMyAdmin\Transformations;
use PhpMyAdmin\Util;

View File

@ -16,7 +16,7 @@ use PhpMyAdmin\Http\Response;
use PhpMyAdmin\Http\ServerRequest;
use PhpMyAdmin\Identifiers\DatabaseName;
use PhpMyAdmin\Identifiers\TableName;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Message;
use PhpMyAdmin\MessageType;
use PhpMyAdmin\Operations;

View File

@ -13,7 +13,7 @@ use PhpMyAdmin\Http\Response;
use PhpMyAdmin\Http\ServerRequest;
use PhpMyAdmin\Identifiers\DatabaseName;
use PhpMyAdmin\Identifiers\TableName;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Message;
use PhpMyAdmin\MessageType;
use PhpMyAdmin\ResponseRenderer;

View File

@ -15,7 +15,7 @@ use PhpMyAdmin\Http\Response;
use PhpMyAdmin\Http\ServerRequest;
use PhpMyAdmin\Identifiers\DatabaseName;
use PhpMyAdmin\Identifiers\TableName;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Message;
use PhpMyAdmin\MessageType;
use PhpMyAdmin\ResponseRenderer;

View File

@ -15,7 +15,7 @@ use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\Html\Generator;
use PhpMyAdmin\Http\Response;
use PhpMyAdmin\Http\ServerRequest;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\MessageType;
use PhpMyAdmin\ResponseRenderer;
use PhpMyAdmin\Table\Table;

View File

@ -14,7 +14,7 @@ use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\Html\Generator;
use PhpMyAdmin\Http\Response;
use PhpMyAdmin\Http\ServerRequest;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Message;
use PhpMyAdmin\MessageType;
use PhpMyAdmin\ResponseRenderer;

View File

@ -22,7 +22,7 @@ use PhpMyAdmin\Http\Response;
use PhpMyAdmin\Http\ServerRequest;
use PhpMyAdmin\Identifiers\DatabaseName;
use PhpMyAdmin\Identifiers\TableName;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Message;
use PhpMyAdmin\Partitioning\Partition;
use PhpMyAdmin\Query\Utilities;

View File

@ -7,6 +7,7 @@ namespace PhpMyAdmin;
use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\Html\Generator;
use PhpMyAdmin\Identifiers\DatabaseName;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Table\Table;
use function count;

View File

@ -9,7 +9,7 @@ use PhpMyAdmin\ConfigStorage\Relation;
use PhpMyAdmin\Current;
use PhpMyAdmin\Dbal\ConnectionType;
use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Message;
use PhpMyAdmin\Query\Generator as QueryGenerator;
use PhpMyAdmin\Table\Table;

View File

@ -13,7 +13,7 @@ use PhpMyAdmin\FieldMetadata;
use PhpMyAdmin\Html\Generator;
use PhpMyAdmin\I18n\LanguageManager;
use PhpMyAdmin\Identifiers\DatabaseName;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\ListDatabase;
use PhpMyAdmin\Query\Cache;
use PhpMyAdmin\Query\Compatibility;

View File

@ -14,8 +14,8 @@ use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\Dbal\ResultInterface;
use PhpMyAdmin\FieldMetadata;
use PhpMyAdmin\Html\Generator;
use PhpMyAdmin\Index;
use PhpMyAdmin\IndexColumn;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Indexes\IndexColumn;
use PhpMyAdmin\Message;
use PhpMyAdmin\MessageType;
use PhpMyAdmin\Plugins\Transformations\Output\Text_Octetstream_Sql;

View File

@ -2,9 +2,10 @@
declare(strict_types=1);
namespace PhpMyAdmin;
namespace PhpMyAdmin\Indexes;
use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\Message;
use function __;
use function array_pop;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace PhpMyAdmin;
namespace PhpMyAdmin\Indexes;
use function __;

View File

@ -7,6 +7,7 @@ namespace PhpMyAdmin;
use PhpMyAdmin\ConfigStorage\Relation;
use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\Html\Generator;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Query\Compatibility;
use function __;

View File

@ -10,7 +10,7 @@ namespace PhpMyAdmin\Plugins\Schema;
use PhpMyAdmin\ConfigStorage\Relation;
use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\Font;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\ResponseRenderer;
use PhpMyAdmin\Util;

View File

@ -15,6 +15,7 @@ use PhpMyAdmin\Display\Results as DisplayResults;
use PhpMyAdmin\Html\Generator;
use PhpMyAdmin\Html\MySQLDocumentation;
use PhpMyAdmin\Identifiers\DatabaseName;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Query\Utilities;
use PhpMyAdmin\SqlParser\Components\Expression;
use PhpMyAdmin\SqlParser\Statements\AlterStatement;

View File

@ -7,7 +7,7 @@ namespace PhpMyAdmin\Table;
use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\Identifiers\DatabaseName;
use PhpMyAdmin\Identifiers\TableName;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Message;
use PhpMyAdmin\Query\Compatibility;
use PhpMyAdmin\Query\Generator as QueryGenerator;

View File

@ -8,7 +8,7 @@ use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\Dbal\Warning;
use PhpMyAdmin\Identifiers\DatabaseName;
use PhpMyAdmin\Identifiers\TableName;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Table\Maintenance\Message;
use PhpMyAdmin\Util;

View File

@ -15,7 +15,7 @@ use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\FieldMetadata;
use PhpMyAdmin\Html\Generator;
use PhpMyAdmin\Html\MySQLDocumentation;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Message;
use PhpMyAdmin\Query\Compatibility;
use PhpMyAdmin\Query\Generator as QueryGenerator;

View File

@ -10,7 +10,7 @@ use PhpMyAdmin\Current;
use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\DbTableExists;
use PhpMyAdmin\Http\Factory\ServerRequestFactory;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Table\Indexes;
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\AbstractTestCase;

View File

@ -11,7 +11,7 @@ use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\DbTableExists;
use PhpMyAdmin\Html\Generator;
use PhpMyAdmin\Html\MySQLDocumentation;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Message;
use PhpMyAdmin\Table\Indexes;
use PhpMyAdmin\Table\Table;

View File

@ -13,7 +13,7 @@ use PhpMyAdmin\Current;
use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\DbTableExists;
use PhpMyAdmin\Http\Factory\ServerRequestFactory;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\AbstractTestCase;
use PhpMyAdmin\Tests\Stubs\DbiDummy;

View File

@ -13,7 +13,7 @@ use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\Dbal\DbiExtension;
use PhpMyAdmin\Dbal\ResultInterface;
use PhpMyAdmin\I18n\LanguageManager;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Query\Utilities;
use PhpMyAdmin\SqlParser\Context;
use PhpMyAdmin\Utils\SessionCache;

View File

@ -2,9 +2,9 @@
declare(strict_types=1);
namespace PhpMyAdmin\Tests;
namespace PhpMyAdmin\Tests\Indexes;
use PhpMyAdmin\IndexColumn;
use PhpMyAdmin\Indexes\IndexColumn;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;

View File

@ -2,9 +2,10 @@
declare(strict_types=1);
namespace PhpMyAdmin\Tests;
namespace PhpMyAdmin\Tests\Indexes;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Tests\AbstractTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
#[CoversClass(Index::class)]

View File

@ -6,7 +6,7 @@ namespace PhpMyAdmin\Tests\Table;
use PhpMyAdmin\Current;
use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\Index;
use PhpMyAdmin\Indexes\Index;
use PhpMyAdmin\Message;
use PhpMyAdmin\Table\Indexes;
use PhpMyAdmin\Table\Table;