File tree Expand file tree Collapse file tree 3 files changed +5
-17
lines changed Expand file tree Collapse file tree 3 files changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ parameters:
5656 -
5757 message: '#^Call to function method_exists\(\) with Doctrine\\DBAL\\Schema\\Table and ''getObjectName'' will always evaluate to true\.$#'
5858 path: src/SchemaDumper.php
59+ -
60+ message: '~^Parameter #1 \$array \(list<string>\) of array_values is already a list, call has no effect\.$~'
61+ path: src/Generator/DiffGeneratorTest.php
5962
6063 symfony:
6164 consoleApplicationLoader: tests/doctrine-migrations-phpstan-app.php
Original file line number Diff line number Diff line change 1616use function class_exists ;
1717use function method_exists ;
1818use function preg_match ;
19- use function strpos ;
20- use function substr ;
2119
2220/**
2321 * The DiffGenerator class is responsible for comparing two Doctrine\DBAL\Schema\Schema instances and generating a
@@ -136,7 +134,7 @@ private function createToSchema(): Schema
136134 foreach ($ toSchema ->getTables () as $ table ) {
137135 $ tableName = $ table ->getName ();
138136
139- if ($ schemaAssetsFilter ($ this -> resolveTableName ( $ tableName) )) {
137+ if ($ schemaAssetsFilter ($ tableName )) {
140138 continue ;
141139 }
142140
@@ -146,17 +144,4 @@ private function createToSchema(): Schema
146144
147145 return $ toSchema ;
148146 }
149-
150- /**
151- * Resolve a table name from its fully qualified name. The `$name` argument
152- * comes from Doctrine\DBAL\Schema\Table#getName which can sometimes return
153- * a namespaced name with the form `{namespace}.{tableName}`. This extracts
154- * the table name from that.
155- */
156- private function resolveTableName (string $ name ): string
157- {
158- $ pos = strpos ($ name , '. ' );
159-
160- return $ pos === false ? $ name : substr ($ name , $ pos + 1 );
161- }
162147}
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public function testGenerate(): void
4747 $ this ->dbalConfiguration ->expects (self ::once ())
4848 ->method ('getSchemaAssetsFilter ' )
4949 ->willReturn (
50- static fn ($ name ): bool => $ name === 'table_name1 ' ,
50+ static fn ($ name ): bool => $ name === 'schema. table_name1 ' ,
5151 );
5252
5353 $ table1 = $ this ->createMock (Table::class);
You can’t perform that action at this time.
0 commit comments