Code Duplication    Length = 7-7 lines in 2 locations

lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php 2 locations

@@ 89-95 (lines=7) @@
86
87
        $query = $em->createQuery($dql);
88
89
        if (($firstResult = $input->getOption('first-result')) !== null) {
90
            if ( ! is_numeric($firstResult)) {
91
                throw new \LogicException("Option 'first-result' must contain an integer value");
92
            }
93
94
            $query->setFirstResult((int) $firstResult);
95
        }
96
97
        if (($maxResult = $input->getOption('max-result')) !== null) {
98
            if ( ! is_numeric($maxResult)) {
@@ 97-103 (lines=7) @@
94
            $query->setFirstResult((int) $firstResult);
95
        }
96
97
        if (($maxResult = $input->getOption('max-result')) !== null) {
98
            if ( ! is_numeric($maxResult)) {
99
                throw new \LogicException("Option 'max-result' must contain an integer value");
100
            }
101
102
            $query->setMaxResults((int) $maxResult);
103
        }
104
105
        if ($input->getOption('show-sql')) {
106
            $ui->text($query->getSQL());