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

@@ 89-96 (lines=8) @@
86
        return "https://{$token}:[email protected]/{$projectAndOrg}.git";
87
    }
88
89
    protected function projectAndOrgFromUrl($remote)
90
    {
91
        $remote = preg_replace('#^git@[^:]*:#', '', $remote);
92
        $remote = preg_replace('#^[^:]*://[^/]*/#', '', $remote);
93
        $remote = preg_replace('#\.git$#', '', $remote);
94
95
        return $remote;
96
    }
97
98
    protected function existingPRs($projectWithOrg, $vids)
99
    {