Code Duplication    Length = 8-8 lines in 2 locations

src/CommandBus/Handler/PackageHandler.php 2 locations

@@ 23-30 (lines=8) @@
20
        $this->package = $package;
21
    }
22
23
    public function handleInstall(Install $command)
24
    {
25
        $result = $this->package->install((new PackageItem())->setHandle($command->getHandle()));
26
        if (!$result->success()) {
27
            $errors = $result->getErrors();
28
            throw new RuntimeException(reset($errors));
29
        }
30
    }
31
32
    public function handleUninstall(Uninstall $command)
33
    {
@@ 32-39 (lines=8) @@
29
        }
30
    }
31
32
    public function handleUninstall(Uninstall $command)
33
    {
34
        $result = $this->package->uninstall((new PackageItem())->setHandle($command->getHandle()));
35
        if (!$result->success()) {
36
            $errors = $result->getErrors();
37
            throw new RuntimeException(reset($errors));
38
        }
39
    }
40
41
    public function handleListPackages(ListPackages $command)
42
    {