Code Duplication    Length = 14-16 lines in 3 locations

lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php 1 location

@@ 214-229 (lines=16) @@
211
        $converter = new ConvertDoctrine1Schema($fromPaths);
212
        $metadata = $converter->getMetadata();
213
214
        if ($metadata) {
215
            $output->writeln('');
216
217
            foreach ($metadata as $class) {
218
                $output->writeln(sprintf('Processing entity "<info>%s</info>"', $class->name));
219
            }
220
221
            $exporter->setMetadata($metadata);
222
            $exporter->export();
223
224
            $output->writeln(PHP_EOL . sprintf(
225
                'Converting Doctrine 1.X schema to "<info>%s</info>" mapping type in "<info>%s</info>"', $toType, $destPath
226
            ));
227
        } else {
228
            $output->writeln('No Metadata Classes to process.');
229
        }
230
    }
231
}
232

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

@@ 174-187 (lines=14) @@
171
            }
172
        }
173
174
        if (count($metadata)) {
175
            foreach ($metadata as $class) {
176
                $output->writeln(sprintf('Processing entity "<info>%s</info>"', $class->name));
177
            }
178
179
            $exporter->setMetadata($metadata);
180
            $exporter->export();
181
182
            $output->writeln(PHP_EOL . sprintf(
183
                'Exporting "<info>%s</info>" mapping information to "<info>%s</info>"', $toType, $destPath
184
            ));
185
        } else {
186
            $output->writeln('No Metadata Classes to process.');
187
        }
188
    }
189
190
    /**

lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php 1 location

@@ 101-115 (lines=15) @@
98
            );
99
        }
100
101
        if ( count($metadatas)) {
102
            foreach ($metadatas as $metadata) {
103
                $output->writeln(
104
                    sprintf('Processing entity "<info>%s</info>"', $metadata->name)
105
                );
106
            }
107
108
            // Generating Proxies
109
            $em->getProxyFactory()->generateProxyClasses($metadatas, $destPath);
110
111
            // Outputting information message
112
            $output->writeln(PHP_EOL . sprintf('Proxy classes generated to "<info>%s</INFO>"', $destPath));
113
        } else {
114
            $output->writeln('No Metadata Classes to process.');
115
        }
116
    }
117
}
118