Code Duplication    Length = 3-3 lines in 2 locations

src/Composer/ScriptHandler.php 2 locations

@@ 38-40 (lines=3) @@
35
36
        if (preg_match('/-cmd$/', $event->getName())) {
37
            $detailedEventClass = 'Taisiya\\CoreBundle\\Event\\Composer\\CommandEvent\\' . Inflector::classify($event->getName()) . 'Event';
38
        } elseif (preg_match('/-dependencies-solving$/', $event->getName())) {
39
            $detailedEventClass = 'Taisiya\\CoreBundle\\Event\\Composer\\InstallerEvent\\' . Inflector::classify($event->getName()) . 'Event';
40
        } elseif (preg_match('/-package-/', $event->getName())) {
41
            $detailedEventClass = 'Taisiya\\CoreBundle\\Event\\Composer\\PackageEvent\\' . Inflector::classify($event->getName()) . 'Event';
42
        } elseif (preg_match('/^(init|command|pre-file-download)$/', $event->getName())) {
43
            $detailedEventClass = 'Taisiya\\CoreBundle\\Event\\Composer\\PluginEvent\\' . Inflector::classify($event->getName()) . 'Event';
@@ 42-44 (lines=3) @@
39
            $detailedEventClass = 'Taisiya\\CoreBundle\\Event\\Composer\\InstallerEvent\\' . Inflector::classify($event->getName()) . 'Event';
40
        } elseif (preg_match('/-package-/', $event->getName())) {
41
            $detailedEventClass = 'Taisiya\\CoreBundle\\Event\\Composer\\PackageEvent\\' . Inflector::classify($event->getName()) . 'Event';
42
        } elseif (preg_match('/^(init|command|pre-file-download)$/', $event->getName())) {
43
            $detailedEventClass = 'Taisiya\\CoreBundle\\Event\\Composer\\PluginEvent\\' . Inflector::classify($event->getName()) . 'Event';
44
        }
45
        $detailedEvent = new $detailedEventClass();
46
        $dispatcher->dispatch($detailedEvent::NAME, $detailedEvent);
47