Code Duplication    Length = 8-8 lines in 2 locations

src/Cli/HubphCommands.php 1 location

@@ 196-203 (lines=8) @@
193
        return $this->getProjectWithOrfFromUrl($remote);
194
    }
195
196
    protected function getProjectWithOrfFromUrl($remote)
197
    {
198
        $remote = preg_replace('#^git@[^:]*:#', '', $remote);
199
        $remote = preg_replace('#^[^:]*://[^/]/#', '', $remote);
200
        $remote = preg_replace('#\.git$#', '', $remote);
201
202
        return $remote;
203
    }
204
205
    protected function getRemote($remote = 'origin', $cwd = '')
206
    {

src/HubphAPI.php 1 location

@@ 162-169 (lines=8) @@
159
        return "https://{$token}:[email protected]/{$projectAndOrg}.git";
160
    }
161
162
    protected function projectAndOrgFromUrl($remote)
163
    {
164
        $remote = preg_replace('#^git@[^:]*:#', '', $remote);
165
        $remote = preg_replace('#^[^:]*://[^/]*/#', '', $remote);
166
        $remote = preg_replace('#\.git$#', '', $remote);
167
168
        return $remote;
169
    }
170
171
    protected function existingPRs($projectWithOrg, VersionIdentifiers $vids)
172
    {