Code Duplication    Length = 9-10 lines in 2 locations

src/PuliPluginImpl.php 2 locations

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