diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml new file mode 100644 index 000000000..adacd735a --- /dev/null +++ b/.github/workflows/rector.yml @@ -0,0 +1,21 @@ +on: + pull_request: + paths-ignore: + - 'docs/**' + - 'README.md' + - 'CHANGELOG.md' + - '.gitignore' + - '.gitattributes' + - 'infection.json.dist' + - 'psalm.xml' + +name: rector + +jobs: + rector: + uses: yiisoft/actions/.github/workflows/rector.yml@master + with: + os: >- + ['ubuntu-latest'] + php: >- + ['8.0'] diff --git a/composer.json b/composer.json index 39e85e068..a52e045d6 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,7 @@ "require-dev": { "ext-json": "*", "phpunit/phpunit": "^9.5", + "rector/rector": "^0.14.3", "roave/infection-static-analysis-plugin": "^1.16", "spatie/phpunit-watcher": "^1.23", "vimeo/psalm": "^4.18", diff --git a/rector.php b/rector.php new file mode 100644 index 000000000..63713ce90 --- /dev/null +++ b/rector.php @@ -0,0 +1,22 @@ +paths([ + __DIR__ . '/src', + __DIR__ . '/tests', + ]); + + // register a single rule + $rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); + + // define sets of rules + $rectorConfig->sets([ + LevelSetList::UP_TO_PHP_80, + ]); +}; diff --git a/src/BaseTokenizer.php b/src/BaseTokenizer.php index 72dac59d4..e0a37720d 100644 --- a/src/BaseTokenizer.php +++ b/src/BaseTokenizer.php @@ -33,11 +33,6 @@ */ abstract class BaseTokenizer { - /** - * @var string SQL code. - */ - private string $sql; - /** * @var int SQL code string length. */ @@ -78,9 +73,12 @@ abstract class BaseTokenizer */ private ?SqlToken $token = null; - public function __construct(string $sql) - { - $this->sql = $sql; + public function __construct( + /** + * @var string SQL code. + */ + private string $sql + ) { } /** @@ -213,9 +211,6 @@ abstract protected function isStringLiteral(int &$length, ?string &$content): bo */ abstract protected function isKeyword(string $string, ?string &$content): bool; - /** - * @param string $sql - */ public function setSql(string $sql): void { $this->sql = $sql; @@ -244,9 +239,7 @@ protected function startsWithAnyLongest( } if (!is_array(reset($with))) { - usort($with, static function (string $string1, string $string2) { - return mb_strlen($string2, 'UTF-8') - mb_strlen($string1, 'UTF-8'); - }); + usort($with, static fn (string $string1, string $string2) => mb_strlen($string2, 'UTF-8') - mb_strlen($string1, 'UTF-8')); $map = []; @@ -333,10 +326,6 @@ protected function indexAfter(string $string, ?int $offset = null): int /** * Determines whether there is a delimited string at the current offset and adds it to the token children. - * - * @param int $length - * - * @return bool */ private function tokenizeDelimitedString(int &$length): bool { @@ -360,10 +349,6 @@ private function tokenizeDelimitedString(int &$length): bool /** * Determines whether there is an operator at the current offset and adds it to the token children. - * - * @param int $length - * - * @return bool */ private function tokenizeOperator(int &$length): bool { @@ -457,8 +442,6 @@ private function addTokenFromBuffer(): void /** * Adds the specified length to the current offset. * - * @param int $length - * * @throws InvalidArgumentException */ private function advance(int $length): void @@ -473,8 +456,6 @@ private function advance(int $length): void /** * Returns whether the SQL code is completely traversed. - * - * @return bool */ private function isEof(): bool { diff --git a/src/Builder/InConditionBuilder.php b/src/Builder/InConditionBuilder.php index 9b04212c3..174966148 100644 --- a/src/Builder/InConditionBuilder.php +++ b/src/Builder/InConditionBuilder.php @@ -48,10 +48,7 @@ protected function buildSubqueryInCondition( /** * Builds SQL for IN condition. * - * @param string|null $operator - * @param array|Traversable $columns * @param iterable|Iterator $values - * @param array $params * * @return string SQL. */ diff --git a/src/ColumnSchemaBuilder.php b/src/ColumnSchemaBuilder.php index a4a6e6d5c..02e2774f4 100644 --- a/src/ColumnSchemaBuilder.php +++ b/src/ColumnSchemaBuilder.php @@ -6,7 +6,7 @@ use Yiisoft\Db\Schema\ColumnSchemaBuilder as AbstractColumnSchemaBuilder; -final class ColumnSchemaBuilder extends AbstractColumnSchemaBuilder +final class ColumnSchemaBuilder extends AbstractColumnSchemaBuilder implements \Stringable { /** * Builds the unsigned string for column. Defaults to unsupported. diff --git a/src/CommandPDO.php b/src/CommandPDO.php index bfb87a969..47f8996a7 100644 --- a/src/CommandPDO.php +++ b/src/CommandPDO.php @@ -179,13 +179,9 @@ protected function queryInternal(int $queryMode): mixed * Splits the specified SQL codes into individual SQL statements and returns them or `false` if there's a single * statement. * - * @param string $sql - * @param array $params - * * @throws InvalidArgumentException * * @return array|bool (array|string)[][]|bool - * * @psalm-param array $params * @psalm-return false|list */ @@ -217,11 +213,6 @@ private function splitStatements(string $sql, array $params): bool|array /** * Returns named bindings used in the specified statement token. * - * @param SqlToken $statement - * @param array $params - * - * @return array - * * @psalm-param array $params */ private function extractUsedParams(SqlToken $statement, array $params): array diff --git a/src/ConnectionPDO.php b/src/ConnectionPDO.php index 8303e98b2..1f4f00d00 100644 --- a/src/ConnectionPDO.php +++ b/src/ConnectionPDO.php @@ -15,8 +15,6 @@ use Yiisoft\Db\Schema\SchemaInterface; use Yiisoft\Db\Transaction\TransactionInterface; -use function strncmp; - /** * Database connection class prefilled for SQLite Server. */ @@ -29,7 +27,7 @@ public function __clone() { $this->transaction = null; - if (strncmp($this->driver->getDsn(), 'sqlite::memory:', 15) !== 0) { + if (!str_starts_with($this->driver->getDsn(), 'sqlite::memory:')) { /** reset PDO connection, unless its sqlite in-memory, which can only have one connection */ $this->pdo = null; } diff --git a/src/DQLQueryBuilder.php b/src/DQLQueryBuilder.php index 994163809..aca2b9343 100644 --- a/src/DQLQueryBuilder.php +++ b/src/DQLQueryBuilder.php @@ -133,8 +133,6 @@ public function buildUnion(array $unions, array &$params = []): string * Contains array of default expression builders. Extend this method and override it, if you want to change default * expression builders for this query builder. * - * @return array - * * See {@see ExpressionBuilder} docs for details. * * @psalm-return array> diff --git a/src/Schema.php b/src/Schema.php index 7d61d40a5..136e9e1af 100644 --- a/src/Schema.php +++ b/src/Schema.php @@ -500,8 +500,6 @@ protected function loadColumnSchema(array $info): ColumnSchemaInterface * @param string $tableName table name. * * @throws Exception|InvalidConfigException|Throwable - * - * @return array */ private function loadTableColumnsInfo(string $tableName): array { @@ -520,8 +518,6 @@ private function loadTableColumnsInfo(string $tableName): array * * @throws Exception|InvalidConfigException|Throwable * - * @return array|Constraint|null - * * @psalm-return (Constraint|IndexConstraint)[]|Constraint|null */ private function loadTableConstraints(string $tableName, string $returnType): Constraint|array|null @@ -648,7 +644,7 @@ private function getPragmaTableInfo(string $tableName): array */ protected function getCacheKey(string $name): array { - return array_merge([__CLASS__], $this->db->getCacheKey(), [$this->getRawTableName($name)]); + return array_merge([self::class], $this->db->getCacheKey(), [$this->getRawTableName($name)]); } /** @@ -660,7 +656,7 @@ protected function getCacheKey(string $name): array */ protected function getCacheTag(): string { - return md5(serialize(array_merge([__CLASS__], $this->db->getCacheKey()))); + return md5(serialize(array_merge([self::class], $this->db->getCacheKey()))); } /** @@ -674,9 +670,7 @@ protected function getCacheTag(): string protected function normalizeRowKeyCase(array $row, bool $multiple): array { if ($multiple) { - return array_map(static function (array $row) { - return array_change_key_case($row, CASE_LOWER); - }, $row); + return array_map(static fn (array $row) => array_change_key_case($row, CASE_LOWER), $row); } return array_change_key_case($row, CASE_LOWER); diff --git a/src/SqlToken.php b/src/SqlToken.php index 8f0878c4c..60f35040c 100644 --- a/src/SqlToken.php +++ b/src/SqlToken.php @@ -22,7 +22,7 @@ * read-only. * @property string $sql SQL code. This property is read-only. */ -final class SqlToken implements ArrayAccess +final class SqlToken implements ArrayAccess, \Stringable { public const TYPE_CODE = 0; public const TYPE_STATEMENT = 1; @@ -234,14 +234,6 @@ public function matches( /** * Tests the given token to match the specified pattern token. - * - * @param SqlToken $patternToken - * @param SqlToken $token - * @param int $offset - * @param int|null $firstMatchIndex - * @param int|null $lastMatchIndex - * - * @return bool */ private function tokensMatch( self $patternToken, @@ -308,10 +300,6 @@ private function tokensMatch( /** * Returns an absolute offset in the children array. - * - * @param int $offset - * - * @return int */ private function calculateOffset(int $offset): int { @@ -348,8 +336,6 @@ private function updateCollectionOffsets(): void * - {@see TYPE_STRING_LITERAL} * * @param int $value token type. It has to be one of the following constants: - * - * @return self */ public function type(int $value): self { @@ -360,10 +346,6 @@ public function type(int $value): self /** * Set token content. - * - * @param string|null $value - * - * @return self */ public function content(?string $value): self { @@ -376,8 +358,6 @@ public function content(?string $value): self * Set original SQL token start position. * * @param int $value original SQL token start position. - * - * @return self */ public function startOffset(int $value): self { @@ -390,8 +370,6 @@ public function startOffset(int $value): self * Set original SQL token end position. * * @param int $value original SQL token end position. - * - * @return self */ public function endOffset(int $value): self { @@ -404,8 +382,6 @@ public function endOffset(int $value): self * Set parent token. * * @param SqlToken $value parent token. - * - * @return self */ public function parent(self $value): self { diff --git a/tests/ColumnSchemaBuilderTest.php b/tests/ColumnSchemaBuilderTest.php index 22aebdbf3..d0effbdc5 100644 --- a/tests/ColumnSchemaBuilderTest.php +++ b/tests/ColumnSchemaBuilderTest.php @@ -37,13 +37,8 @@ public function typesProvider(): array /** * @dataProvider typesProvider - * - * @param string $expected - * @param string $type - * @param int|null $length - * @param mixed $calls */ - public function testCustomTypes(string $expected, string $type, ?int $length, $calls): void + public function testCustomTypes(string $expected, string $type, ?int $length, mixed $calls): void { $this->checkBuildString($expected, $type, $length, $calls); } diff --git a/tests/CommandTest.php b/tests/CommandTest.php index e2657f429..aa5995622 100644 --- a/tests/CommandTest.php +++ b/tests/CommandTest.php @@ -179,8 +179,6 @@ public function testBatchInsertSQL( * * @dataProvider bindParamsNonWhereProviderTrait * - * @param string $sql - * * @throws Exception * @throws InvalidArgumentException * @throws InvalidConfigException @@ -229,13 +227,11 @@ public function testGetRawSql(string $sql, array $params, string $expectedRawSql * * @dataProvider invalidSelectColumnsProviderTrait * - * @param mixed $invalidSelectColumns - * * @throws Exception * @throws InvalidConfigException * @throws NotSupportedException */ - public function testInsertSelectFailed($invalidSelectColumns): void + public function testInsertSelectFailed(mixed $invalidSelectColumns): void { $db = $this->getConnection(); $query = new Query($db); @@ -249,9 +245,6 @@ public function testInsertSelectFailed($invalidSelectColumns): void /** * @dataProvider upsertProviderTrait * - * @param array $firstData - * @param array $secondData - * * @throws Exception * @throws InvalidConfigException * @throws NotSupportedException diff --git a/tests/ConnectionTest.php b/tests/ConnectionTest.php index d3f867a28..f181cc66b 100644 --- a/tests/ConnectionTest.php +++ b/tests/ConnectionTest.php @@ -127,15 +127,17 @@ public function testMasterSlave(): void $db->createCommand('SELECT description FROM profile WHERE id=1')->queryScalar() ); - $result = $db->useMaster(static function (ConnectionInterface $db) { - return $db->createCommand('SELECT description FROM profile WHERE id=1')->queryScalar(); - }); + $result = $db->useMaster(static fn (ConnectionInterface $db) => $db->createCommand('SELECT description FROM profile WHERE id=1')->queryScalar()); $this->assertEquals('test', $result); } } public function testMastersShuffled(): void { + $mastersCount = null; + $slavesCount = null; + $hit_slaves = []; + $hit_masters = []; $this->markTestSkipped('Only for master/slave'); $mastersCount = 2; @@ -164,6 +166,10 @@ public function testMastersShuffled(): void public function testMastersSequential(): void { + $mastersCount = null; + $slavesCount = null; + $hit_slaves = []; + $hit_masters = []; $this->markTestSkipped('Only for master/slave'); $mastersCount = 2; @@ -203,6 +209,7 @@ public function testQuoteValue(): void public function testRestoreMasterAfterException(): void { + $db = null; $this->markTestSkipped('Only for master/slave'); $db = $this->prepareMasterSlave(1, 1); @@ -213,7 +220,7 @@ public function testRestoreMasterAfterException(): void throw new Exception('fail'); }); $this->fail('Exceptions was caught somewhere'); - } catch (Exception $e) { + } catch (Exception) { /* ok */ } @@ -222,6 +229,7 @@ public function testRestoreMasterAfterException(): void public function testServerStatusCacheWorks(): void { + $db = null; $this->markTestSkipped('Only for master/slave'); $cacheKeyNormalizer = new CacheKeyNormalizer(); @@ -255,7 +263,7 @@ public function testServerStatusCacheWorks(): void try { $db->open(); - } catch (InvalidConfigException $e) { + } catch (InvalidConfigException) { } $this->assertTrue( @@ -266,6 +274,7 @@ public function testServerStatusCacheWorks(): void public function testServerStatusCacheCanBeDisabled(): void { + $db = null; $this->markTestSkipped('Only for master/slave'); $cacheKeyNormalizer = new CacheKeyNormalizer(); @@ -297,7 +306,7 @@ public function testServerStatusCacheCanBeDisabled(): void try { $db->open(); - } catch (InvalidConfigException $e) { + } catch (InvalidConfigException) { } $this->assertFalse($this->cache->psr()->has($cacheKey), 'Caching is disabled'); @@ -335,6 +344,7 @@ public function testTransactionShortcutCustom(): void protected function prepareMasterSlave($masterCount, $slaveCount): ConnectionInterface { + $db = null; $this->markTestSkipped('Only for master/slave'); $db = $this->getConnection(true); @@ -362,9 +372,6 @@ protected function prepareMasterSlave($masterCount, $slaveCount): ConnectionInte return $db; } - /** - * @param ConnectionInterface $db - */ private function runExceptionTest(ConnectionInterface $db): void { $thrown = false; diff --git a/tests/Provider/QueryBuilderProvider.php b/tests/Provider/QueryBuilderProvider.php index d26f986e3..4fb6c0f6a 100644 --- a/tests/Provider/QueryBuilderProvider.php +++ b/tests/Provider/QueryBuilderProvider.php @@ -72,9 +72,7 @@ public function createDropIndexesProvider(): array $tableName = 'mytable'; $result['with schema'] = [ "CREATE INDEX {{{$schemaName}}}.[[$indexName]] ON {{{$tableName}}} ([[C_index_1]])", - static function (QueryBuilderInterface $qb) use ($tableName, $indexName, $schemaName) { - return $qb->createIndex($indexName, $schemaName . '.' . $tableName, 'C_index_1'); - }, + static fn (QueryBuilderInterface $qb) => $qb->createIndex($indexName, $schemaName . '.' . $tableName, 'C_index_1'), ]; return $result; } diff --git a/tests/QueryBuilderTest.php b/tests/QueryBuilderTest.php index bd2d2feac..82c7304a8 100644 --- a/tests/QueryBuilderTest.php +++ b/tests/QueryBuilderTest.php @@ -34,11 +34,7 @@ public function testAddForeignKey(): void /** * @dataProvider \Yiisoft\Db\Sqlite\Tests\Provider\QueryBuilderProvider::batchInsertProvider * - * @param string $table - * @param array $columns - * @param array $value * @param string $expected - * @param array $expectedParams * * @throws Exception|InvalidArgumentException|InvalidConfigException|NotSupportedException */ @@ -56,13 +52,9 @@ public function testBatchInsert(string $table, array $columns, array $value, ?st /** * @dataProvider \Yiisoft\Db\Sqlite\Tests\Provider\QueryBuilderProvider::buildConditionsProvider * - * @param array|ExpressionInterface $condition - * @param string $expected - * @param array $expectedParams - * * @throws Exception|InvalidArgumentException|InvalidConfigException|NotSupportedException */ - public function testBuildCondition($condition, string $expected, array $expectedParams): void + public function testBuildCondition(array|ExpressionInterface $condition, string $expected, array $expectedParams): void { $db = $this->getConnection(); $query = (new Query($db))->where($condition); @@ -77,10 +69,6 @@ public function testBuildCondition($condition, string $expected, array $expected /** * @dataProvider \Yiisoft\Db\Sqlite\Tests\Provider\QueryBuilderProvider::buildFilterConditionProvider * - * @param array $condition - * @param string $expected - * @param array $expectedParams - * * @throws Exception|InvalidArgumentException|InvalidConfigException|NotSupportedException */ public function testBuildFilterCondition(array $condition, string $expected, array $expectedParams): void @@ -98,9 +86,6 @@ public function testBuildFilterCondition(array $condition, string $expected, arr /** * @dataProvider \Yiisoft\Db\Sqlite\Tests\Provider\QueryBuilderProvider::buildFromDataProvider * - * @param string $table - * @param string $expected - * * @throws Exception */ public function testBuildFrom(string $table, string $expected): void @@ -117,13 +102,9 @@ public function testBuildFrom(string $table, string $expected): void /** * @dataProvider \Yiisoft\Db\Sqlite\Tests\Provider\QueryBuilderProvider::buildLikeConditionsProvider * - * @param array|ExpressionInterface $condition - * @param string $expected - * @param array $expectedParams - * * @throws Exception|InvalidArgumentException|InvalidConfigException|NotSupportedException */ - public function testBuildLikeCondition($condition, string $expected, array $expectedParams): void + public function testBuildLikeCondition(array|ExpressionInterface $condition, string $expected, array $expectedParams): void { $db = $this->getConnection(); $query = (new Query($db))->where($condition); @@ -163,9 +144,6 @@ public function testBuildUnion(): void /** * @dataProvider \Yiisoft\Db\Sqlite\Tests\Provider\QueryBuilderProvider::buildExistsParamsProvider * - * @param string $cond - * @param string $expectedQuerySql - * * @throws Exception|InvalidArgumentException|InvalidConfigException|NotSupportedException */ public function testBuildWhereExists(string $cond, string $expectedQuerySql): void @@ -205,8 +183,6 @@ public function testBuildWithQuery() /** * @dataProvider \Yiisoft\Db\Sqlite\Tests\Provider\QueryBuilderProvider::createDropIndexesProvider - * - * @param string $sql */ public function testCreateDropIndex(string $sql, Closure $builder): void { @@ -217,14 +193,9 @@ public function testCreateDropIndex(string $sql, Closure $builder): void /** * @dataProvider \Yiisoft\Db\Sqlite\Tests\Provider\QueryBuilderProvider::deleteProvider * - * @param string $table - * @param array|string $condition - * @param string $expectedSQL - * @param array $expectedParams - * * @throws Exception|InvalidArgumentException|InvalidConfigException|NotSupportedException */ - public function testDelete(string $table, $condition, string $expectedSQL, array $expectedParams): void + public function testDelete(string $table, array|string $condition, string $expectedSQL, array $expectedParams): void { $db = $this->getConnection(); $actualParams = []; @@ -252,7 +223,7 @@ public function testCreateTableColumnTypes(): void strncmp($column, Schema::TYPE_UPK, 3) === 0 || strncmp($column, Schema::TYPE_BIGPK, 5) === 0 || strncmp($column, Schema::TYPE_UBIGPK, 6) === 0 || - strncmp(substr($column, -5), 'FIRST', 5) === 0 + str_starts_with(substr($column, -5), 'FIRST') ) ) { $columns['col' . ++$i] = str_replace('CHECK (value', 'CHECK ([[col' . $i . ']]', $column); @@ -281,15 +252,9 @@ public function testRenameTable() /** * @dataProvider \Yiisoft\Db\Sqlite\Tests\Provider\QueryBuilderProvider::insertProvider * - * @param string $table - * @param array|QueryInterface $columns - * @param array $params - * @param string $expectedSQL - * @param array $expectedParams - * * @throws Exception|InvalidArgumentException|InvalidConfigException|NotSupportedException */ - public function testInsert(string $table, $columns, array $params, string $expectedSQL, array $expectedParams): void + public function testInsert(string $table, array|QueryInterface $columns, array $params, string $expectedSQL, array $expectedParams): void { $db = $this->getConnection(); $this->assertSame($expectedSQL, $db->getQueryBuilder()->insert($table, $columns, $params)); @@ -334,18 +299,12 @@ public function testResetSequence(): void /** * @dataProvider \Yiisoft\Db\Sqlite\Tests\Provider\QueryBuilderProvider::updateProvider * - * @param string $table - * @param array $columns - * @param array|string $condition - * @param string $expectedSQL - * @param array $expectedParams - * * @throws Exception|InvalidArgumentException|InvalidConfigException|NotSupportedException */ public function testUpdate( string $table, array $columns, - $condition, + array|string $condition, string $expectedSQL, array $expectedParams ): void { @@ -359,15 +318,11 @@ public function testUpdate( /** * @dataProvider \Yiisoft\Db\Sqlite\Tests\Provider\QueryBuilderProvider::upsertProvider * - * @param string $table - * @param array|QueryInterface $insertColumns - * @param array|bool $updateColumns * @param string|string[] $expectedSQL - * @param array $expectedParams * * @throws Exception|NotSupportedException */ - public function testUpsert(string $table, $insertColumns, $updateColumns, $expectedSQL, array $expectedParams): void + public function testUpsert(string $table, array|QueryInterface $insertColumns, array|bool $updateColumns, string|array $expectedSQL, array $expectedParams): void { $actualParams = []; $db = $this->getConnection(); diff --git a/tests/SchemaTest.php b/tests/SchemaTest.php index 161cd248d..f49654139 100644 --- a/tests/SchemaTest.php +++ b/tests/SchemaTest.php @@ -230,7 +230,7 @@ public function testFindUniqueIndexes(): void try { $db->createCommand()->dropTable('uniqueIndex')->execute(); - } catch (Exception $e) { + } catch (Exception) { } $db->createCommand()->createTable('uniqueIndex', ['somecol' => 'string', 'someCol2' => 'string'])->execute(); @@ -342,8 +342,6 @@ public function testForeingKey(): void /** * @dataProvider pdoAttributesProviderTrait * - * @param array $pdoAttributes - * * @throws Exception * @throws InvalidConfigException */ @@ -359,9 +357,7 @@ public function testGetTableNames(array $pdoAttributes): void $tables = $schema->getTableNames(); if ($db->getDriver()->getDriverName() === 'sqlsrv') { - $tables = array_map(static function ($item) { - return trim($item, '[]'); - }, $tables); + $tables = array_map(static fn ($item) => trim($item, '[]'), $tables); } $this->assertContains('customer', $tables); @@ -376,8 +372,6 @@ public function testGetTableNames(array $pdoAttributes): void /** * @dataProvider pdoAttributesProviderTrait - * - * @param array $pdoAttributes */ public function testGetTableSchemas(array $pdoAttributes): void { @@ -450,12 +444,8 @@ public function constraintsProvider() /** * @dataProvider constraintsProvider - * - * @param string $tableName - * @param string $type - * @param mixed $expected */ - public function testTableSchemaConstraints(string $tableName, string $type, $expected): void + public function testTableSchemaConstraints(string $tableName, string $type, mixed $expected): void { if ($expected === false) { $this->expectException(NotSupportedException::class); @@ -468,14 +458,10 @@ public function testTableSchemaConstraints(string $tableName, string $type, $exp /** * @dataProvider lowercaseConstraintsProviderTrait * - * @param string $tableName - * @param string $type - * @param mixed $expected - * * @throws Exception * @throws InvalidConfigException */ - public function testTableSchemaConstraintsWithPdoLowercase(string $tableName, string $type, $expected): void + public function testTableSchemaConstraintsWithPdoLowercase(string $tableName, string $type, mixed $expected): void { if ($expected === false) { $this->expectException(NotSupportedException::class); @@ -490,14 +476,10 @@ public function testTableSchemaConstraintsWithPdoLowercase(string $tableName, st /** * @dataProvider uppercaseConstraintsProviderTrait * - * @param string $tableName - * @param string $type - * @param mixed $expected - * * @throws Exception * @throws InvalidConfigException */ - public function testTableSchemaConstraintsWithPdoUppercase(string $tableName, string $type, $expected): void + public function testTableSchemaConstraintsWithPdoUppercase(string $tableName, string $type, mixed $expected): void { if ($expected === false) { $this->expectException(NotSupportedException::class); @@ -511,11 +493,6 @@ public function testTableSchemaConstraintsWithPdoUppercase(string $tableName, st /** * @dataProvider tableSchemaCachePrefixesProviderTrait - * - * @param string $tablePrefix - * @param string $tableName - * @param string $testTablePrefix - * @param string $testTableName */ public function testTableSchemaCacheWithTablePrefixes( string $tablePrefix,