Code Duplication    Length = 10-10 lines in 2 locations

src/Service/Package/Driver/LegacyDriver.php 1 location

@@ 126-135 (lines=10) @@
123
     * @param PackageItem $package
124
     * @return \Buttress\Concrete\Service\Result
125
     */
126
    public function show(PackageItem $package, CLImate $cli)
127
    {
128
        if (!$this->connection->isConnected()) {
129
            return new Result(false, 'Not connected to concrete5 site.');
130
        }
131
132
        $cli->flank($package->getHandle());
133
        $cli->out($package->isInstalled() ? 'Installed Version ' : 'Not Installed: ');
134
        $cli->bold()->inline($package->getVersion());
135
    }
136
137
    /**
138
     * Get a list of package item objects

src/Service/Package/Driver/ModernDriver.php 1 location

@@ 159-168 (lines=10) @@
156
     * @param \League\CLImate\CLImate $cli
157
     * @return \Buttress\Concrete\Service\Result
158
     */
159
    public function show(PackageItem $package, CLImate $cli)
160
    {
161
        if (!$this->connection->isConnected()) {
162
            return new Result(false, 'Not connected to concrete5 site.');
163
        }
164
165
        $cli->flank($package->getHandle());
166
        $cli->out($package->isInstalled() ? 'Installed Version ' : 'Not Installed: ');
167
        $cli->bold()->inline($package->getVersion());
168
    }
169
170
    /**
171
     * Get a list of package item objects