Skip to content

Commit 5f7cb42

Browse files
committed
fix phpstan errors
1 parent f7f8e8c commit 5f7cb42

File tree

4 files changed

+10
-23
lines changed

4 files changed

+10
-23
lines changed

src/AbstractMigration.php

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -90,38 +90,22 @@ public function skipIf(bool $condition, string $message = 'Unknown Reason'): voi
9090
}
9191
}
9292

93-
/**
94-
* @throws MigrationException|DBALException
95-
*
96-
* @phpstan-ignore throws.unusedType,throws.unusedType
97-
*/
93+
/** @throws MigrationException|DBALException */
9894
public function preUp(Schema $schema): void
9995
{
10096
}
10197

102-
/**
103-
* @throws MigrationException|DBALException
104-
*
105-
* @phpstan-ignore throws.unusedType,throws.unusedType
106-
*/
98+
/** @throws MigrationException|DBALException */
10799
public function postUp(Schema $schema): void
108100
{
109101
}
110102

111-
/**
112-
* @throws MigrationException|DBALException
113-
*
114-
* @phpstan-ignore throws.unusedType,throws.unusedType
115-
*/
103+
/** @throws MigrationException|DBALException */
116104
public function preDown(Schema $schema): void
117105
{
118106
}
119107

120-
/**
121-
* @throws MigrationException|DBALException
122-
*
123-
* @phpstan-ignore throws.unusedType,throws.unusedType
124-
*/
108+
/** @throws MigrationException|DBALException */
125109
public function postDown(Schema $schema): void
126110
{
127111
}

src/Tools/Console/Command/DoctrineCommand.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
128128
}
129129
}
130130

131-
abstract protected function doExecute(InputInterface $input, OutputInterface $output): int;
131+
protected function doExecute(InputInterface $input, OutputInterface $output): int
132+
{
133+
throw new Exception('You must implement the doExecute() method in the concrete command class.');
134+
}
132135

133136
protected function getDependencyFactory(): DependencyFactory
134137
{

src/Tools/Console/Command/DumpSchemaCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
8686
}
8787

8888
/** @throws SchemaDumpRequiresNoMigrations */
89-
public function doExecute(
89+
protected function doExecute(
9090
InputInterface $input,
9191
OutputInterface $output,
9292
): int {

src/Tools/Console/Command/SyncMetadataCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
3737
return parent::execute($input, $output);
3838
}
3939

40-
public function doExecute(
40+
protected function doExecute(
4141
InputInterface $input,
4242
OutputInterface $output,
4343
): int {

0 commit comments

Comments
 (0)