Code Duplication    Length = 9-10 lines in 2 locations

src/PuliPluginImpl.php 2 locations

@@ 710-719 (lines=10) @@
707
            return;
708
        }
709
710
        if (version_compare($matches[1], self::MIN_CLI_VERSION, '<')) {
711
            throw new RuntimeException(sprintf(
712
                'Found an unsupported version of the Puli CLI: %s. Please '.
713
                'upgrade to version %s or higher. You can also install the '.
714
                'puli/cli dependency at version %s in your project.',
715
                $matches[1],
716
                self::MIN_CLI_VERSION,
717
                self::MIN_CLI_VERSION
718
            ));
719
        }
720
721
        if (version_compare($matches[1], self::MAX_CLI_VERSION, '>')) {
722
            throw new RuntimeException(sprintf(
@@ 721-729 (lines=9) @@
718
            ));
719
        }
720
721
        if (version_compare($matches[1], self::MAX_CLI_VERSION, '>')) {
722
            throw new RuntimeException(sprintf(
723
                'Found an unsupported version of the Puli CLI: %s. Please '.
724
                'downgrade to a lower version than %s. You can also install '.
725
                'the puli/cli dependency in your project.',
726
                $matches[1],
727
                self::MAX_CLI_VERSION
728
            ));
729
        }
730
    }
731
}
732