Code Duplication    Length = 12-12 lines in 2 locations

src/Chamilo/InstallerBundle/Requirement/ExtensionsRequirements.php 1 location

@@ 245-256 (lines=12) @@
242
            );
243
244
        if (class_exists('Locale')) {
245
            if (defined('INTL_ICU_VERSION')) {
246
                $version = INTL_ICU_VERSION;
247
            } else {
248
                $reflector = new ReflectionExtension('intl');
249
250
                ob_start();
251
                $reflector->info();
252
                $output = strip_tags(ob_get_clean());
253
254
                preg_match('/^ICU version +(?:=> )?(.*)$/m', $output, $matches);
255
                $version = $matches[1];
256
            }
257
258
            $this->add(
259
                new Requirement(

app/SymfonyRequirements.php 1 location

@@ 677-688 (lines=12) @@
674
            );
675
676
            // check for compatible ICU versions (only done when you have the intl extension)
677
            if (defined('INTL_ICU_VERSION')) {
678
                $version = INTL_ICU_VERSION;
679
            } else {
680
                $reflector = new ReflectionExtension('intl');
681
682
                ob_start();
683
                $reflector->info();
684
                $output = strip_tags(ob_get_clean());
685
686
                preg_match('/^ICU version +(?:=> )?(.*)$/m', $output, $matches);
687
                $version = $matches[1];
688
            }
689
690
            $this->addRecommendation(
691
                version_compare($version, '4.0', '>='),