Code Duplication    Length = 9-10 lines in 2 locations

src/PuliPluginImpl.php 2 locations

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