Skip to content

Commit f2729b0

Browse files
authored
Return 0 when there's no metadata to process (#9147)
1 parent cd44547 commit f2729b0

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
151151
if (empty($metadata)) {
152152
$ui->success('No Metadata Classes to process.');
153153

154-
return;
154+
return 0;
155155
}
156156

157157
foreach ($metadata as $class) {

phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,11 +2021,6 @@ parameters:
20212021
count: 1
20222022
path: lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php
20232023

2024-
-
2025-
message: "#^Method Doctrine\\\\ORM\\\\Tools\\\\Console\\\\Command\\\\ConvertMappingCommand\\:\\:execute\\(\\) should return int but empty return statement found\\.$#"
2026-
count: 1
2027-
path: lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php
2028-
20292024
-
20302025
message: "#^Parameter \\#1 \\$metadata of method Doctrine\\\\ORM\\\\Tools\\\\Export\\\\Driver\\\\AbstractExporter\\:\\:setMetadata\\(\\) expects array\\<int, Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadata\\>, array\\<Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadata\\> given\\.$#"
20312026
count: 1

0 commit comments

Comments
 (0)