Code Duplication    Length = 10-10 lines in 2 locations

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

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

@@ 142-151 (lines=10) @@
139
     * @param PackageItem $package
140
     * @return \Buttress\Concrete\Service\Result
141
     */
142
    public function show(PackageItem $package, CLImate $cli)
143
    {
144
        if (!$this->connection->isConnected()) {
145
            return new Result(false, 'Not connected to concrete5 site.');
146
        }
147
148
        $cli->flank($package->getHandle());
149
        $cli->out($package->isInstalled() ? 'Installed Version ' : 'Not Installed: ');
150
        $cli->bold()->inline($package->getVersion());
151
    }
152
153
    /**
154
     * Get a list of package item objects