Code Duplication    Length = 9-10 lines in 2 locations

src/PuliPluginImpl.php 2 locations

@@ 731-740 (lines=10) @@
728
            return;
729
        }
730
731
        if (version_compare($matches[1], self::MIN_CLI_VERSION, '<')) {
732
            throw new RuntimeException(sprintf(
733
                'Found an unsupported version of the Puli CLI: %s. Please '.
734
                'upgrade to version %s or higher. You can also install the '.
735
                'puli/cli dependency at version %s in your project.',
736
                $matches[1],
737
                self::MIN_CLI_VERSION,
738
                self::MIN_CLI_VERSION
739
            ));
740
        }
741
742
        if (version_compare($matches[1], self::MAX_CLI_VERSION, '>')) {
743
            throw new RuntimeException(sprintf(
@@ 742-750 (lines=9) @@
739
            ));
740
        }
741
742
        if (version_compare($matches[1], self::MAX_CLI_VERSION, '>')) {
743
            throw new RuntimeException(sprintf(
744
                'Found an unsupported version of the Puli CLI: %s. Please '.
745
                'downgrade to a lower version than %s. You can also install '.
746
                'the puli/cli dependency in your project.',
747
                $matches[1],
748
                self::MAX_CLI_VERSION
749
            ));
750
        }
751
    }
752
}
753