Code Duplication    Length = 11-11 lines in 2 locations

src/Composer/Installer/AframeComponentInstaller.php 2 locations

@@ 122-132 (lines=11) @@
119
        $this->supportedByName($package->getPrettyName());
120
        $this->setComponentPath();
121
        
122
        if ($this->supportedByName($package->getPrettyName())) {
123
            $this->io->info(sprintf("Installing A-Frame Component %s", $this->aframe_component_name));
124
            $src = $this->getInstallPath($package) . DIRECTORY_SEPARATOR . 'dist';
125
            if (! is_dir($src)) {
126
                $this->io->warning(sprintf('A-Frame Component %s can not be used since missing dist directory!', $this->aframe_component_name));
127
            } else {
128
                $this->filesystem->ensureDirectoryExists($this->getComponentPath());
129
                
130
                $this->copy($src, $this->getComponentPath());
131
            }
132
        }
133
    }
134
135
    /**
@@ 156-166 (lines=11) @@
153
        $this->supportedByName($package->getPrettyName());
154
        $this->setComponentPath();
155
        
156
        if ($this->supportedByName($package->getPrettyName())) {
157
            $this->io->info(sprintf("Updating A-Frame Component %s", $this->aframe_component_name));
158
            $src = $this->getInstallPath($package) . DIRECTORY_SEPARATOR . 'dist';
159
            if (! is_dir($src)) {
160
                $this->io->warning(sprintf('A-Frame Component %s can not be used since missing dist directory!', $this->aframe_component_name));
161
            } else {
162
                $this->filesystem->removeDirectory($this->getComponentPath());
163
                $this->filesystem->ensureDirectoryExists($this->getComponentPath());
164
                $this->copy($src, $this->getComponentPath());
165
            }
166
        }
167
    }
168
169
    /**