Code Duplication    Length = 9-9 lines in 3 locations

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

@@ 62-70 (lines=9) @@
59
60
        $destPath = realpath($destPath);
61
62
        if ( ! file_exists($destPath)) {
63
            throw new \InvalidArgumentException(
64
                sprintf("Hydrators destination directory '<info>%s</info>' does not exist.", $destPath)
65
            );
66
        } elseif ( ! is_writable($destPath)) {
67
            throw new \InvalidArgumentException(
68
                sprintf("Hydrators destination directory '<info>%s</info>' does not have write permissions.", $destPath)
69
            );
70
        }
71
72
        if (count($metadatas)) {
73
            foreach ($metadatas as $metadata) {

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

@@ 62-70 (lines=9) @@
59
60
        $destPath = realpath($destPath);
61
62
        if ( ! file_exists($destPath)) {
63
            throw new \InvalidArgumentException(
64
                sprintf("Persistent collections destination directory '<info>%s</info>' does not exist.", $destPath)
65
            );
66
        } elseif ( ! is_writable($destPath)) {
67
            throw new \InvalidArgumentException(
68
                sprintf("Persistent collections destination directory '<info>%s</info>' does not have write permissions.", $destPath)
69
            );
70
        }
71
72
        if (count($metadatas)) {
73
            $generated = [];

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

@@ 65-73 (lines=9) @@
62
63
        $destPath = realpath($destPath);
64
65
        if ( ! file_exists($destPath)) {
66
            throw new \InvalidArgumentException(
67
                sprintf("Proxies destination directory '<info>%s</info>' does not exist.", $destPath)
68
            );
69
        } elseif ( ! is_writable($destPath)) {
70
            throw new \InvalidArgumentException(
71
                sprintf("Proxies destination directory '<info>%s</info>' does not have write permissions.", $destPath)
72
            );
73
        }
74
75
        if (count($metadatas)) {
76
            foreach ($metadatas as $metadata) {