Code Duplication    Length = 9-9 lines in 3 locations

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

@@ 75-83 (lines=9) @@
72
73
        $destPath = realpath($destPath);
74
75
        if (! file_exists($destPath)) {
76
            throw new \InvalidArgumentException(
77
                sprintf("Hydrators destination directory '<info>%s</info>' does not exist.", $destPath)
78
            );
79
        } elseif (! is_writable($destPath)) {
80
            throw new \InvalidArgumentException(
81
                sprintf("Hydrators destination directory '<info>%s</info>' does not have write permissions.", $destPath)
82
            );
83
        }
84
85
        if (count($metadatas)) {
86
            foreach ($metadatas as $metadata) {

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

@@ 75-83 (lines=9) @@
72
73
        $destPath = realpath($destPath);
74
75
        if (! file_exists($destPath)) {
76
            throw new \InvalidArgumentException(
77
                sprintf("Persistent collections destination directory '<info>%s</info>' does not exist.", $destPath)
78
            );
79
        } elseif (! is_writable($destPath)) {
80
            throw new \InvalidArgumentException(
81
                sprintf("Persistent collections destination directory '<info>%s</info>' does not have write permissions.", $destPath)
82
            );
83
        }
84
85
        if (count($metadatas)) {
86
            $generated = [];

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

@@ 79-87 (lines=9) @@
76
77
        $destPath = realpath($destPath);
78
79
        if (! file_exists($destPath)) {
80
            throw new \InvalidArgumentException(
81
                sprintf("Proxies destination directory '<info>%s</info>' does not exist.", $destPath)
82
            );
83
        } elseif (! is_writable($destPath)) {
84
            throw new \InvalidArgumentException(
85
                sprintf("Proxies destination directory '<info>%s</info>' does not have write permissions.", $destPath)
86
            );
87
        }
88
89
        if (count($metadatas)) {
90
            foreach ($metadatas as $metadata) {