Code Duplication    Length = 16-16 lines in 2 locations

src/Bluz/Composer/Installers/Plugin.php 2 locations

@@ 82-97 (lines=16) @@
79
     *
80
     * It copies bluz module
81
     */
82
    public function onPostPackageInstall(PackageEvent $event)
83
    {
84
        $packageName = $event->getOperation()
85
            ->getPackage()
86
            ->getName();
87
88
        $event->getIo()->write(
89
            "  - Installing module `$packageName`:",
90
            true,
91
            IOInterface::VERBOSE
92
        );
93
94
        if (file_exists($this->installer->getOption('vendorPath'))) {
95
            $this->copy();
96
        }
97
    }
98
99
    /**
100
     * Hook which is called before update package
@@ 128-143 (lines=16) @@
125
     *
126
     * It removes bluz module
127
     */
128
    public function onPrePackageRemove(PackageEvent $event)
129
    {
130
        $packageName = $event->getOperation()
131
            ->getPackage()
132
            ->getName();
133
134
        $event->getIo()->write(
135
            "  - Removing module `$packageName`:",
136
            true,
137
            IOInterface::VERBOSE
138
        );
139
140
        if (file_exists($this->installer->getOption('vendorPath'))) {
141
            $this->remove();
142
        }
143
    }
144
145
    /**
146
     * It recursively copies the files and directories