Code Duplication    Length = 7-7 lines in 2 locations

lib/Doctrine/ODM/MongoDB/Tools/Console/Command/Schema/ShardCommand.php 1 location

@@ 37-43 (lines=7) @@
34
        $isErrored = false;
35
36
        try {
37
            if (is_string($class)) {
38
                $this->processDocumentIndex($sm, $class);
39
                $output->writeln(sprintf('Enabled sharding for <info>%s</info>', $class));
40
            } else {
41
                $this->processIndex($sm);
42
                $output->writeln('Enabled sharding for <info>all classes</info>');
43
            }
44
        } catch (Throwable $e) {
45
            $output->writeln('<error>' . $e->getMessage() . '</error>');
46
            $isErrored = true;

lib/Doctrine/ODM/MongoDB/Tools/Console/Command/Schema/UpdateCommand.php 1 location

@@ 43-49 (lines=7) @@
40
        $isErrored = false;
41
42
        try {
43
            if (is_string($class)) {
44
                $this->processDocumentIndex($sm, $class);
45
                $output->writeln(sprintf('Updated <comment>index(es)</comment> for <info>%s</info>', $class));
46
            } else {
47
                $this->processIndex($sm);
48
                $output->writeln('Updated <comment>indexes</comment> for <info>all classes</info>');
49
            }
50
        } catch (Throwable $e) {
51
            $output->writeln('<error>' . $e->getMessage() . '</error>');
52
            $isErrored = true;