Code Duplication    Length = 11-11 lines in 2 locations

src/Installers/Plugin.php 2 locations

@@ 155-165 (lines=11) @@
152
     *
153
     * @throws \InvalidArgumentException
154
     */
155
    public function copyModuleFiles(PackageEvent $event)
156
    {
157
        $package = $this->extractPackage($event);
158
        $this->packagePath = $this->vendorPath .DS. $package->getName();
159
        if ($package->getType() === 'bluz-module' && file_exists($this->packagePath)) {
160
            if ($package->getExtra() && isset($package->getExtra()['copy-files'])) {
161
                $this->copyExtras($package->getExtra()['copy-files']);
162
            }
163
            $this->copyModule();
164
        }
165
    }
166
167
    /**
168
     * Hook which is called before update package
@@ 173-183 (lines=11) @@
170
     *
171
     * @param PackageEvent $event
172
     */
173
    public function removeModuleFiles(PackageEvent $event)
174
    {
175
        $package = $this->extractPackage($event);
176
        $this->packagePath = $this->vendorPath .DS. $package->getName();
177
        if ($package->getType() === 'bluz-module' && file_exists($this->packagePath)) {
178
            if ($package->getExtra() && isset($package->getExtra()['copy-files'])) {
179
                $this->removeExtras($package->getExtra()['copy-files']);
180
            }
181
            $this->removeModule();
182
        }
183
    }
184
185
    /**
186
     * Get Filesystem