Code Duplication    Length = 8-8 lines in 2 locations

src/Cli/HubphCommands.php 1 location

@@ 188-195 (lines=8) @@
185
        return $this->getProjectWithOrfFromUrl($remote);
186
    }
187
188
    protected function getProjectWithOrfFromUrl($remote)
189
    {
190
        $remote = preg_replace('#^git@[^:]*:#', '', $remote);
191
        $remote = preg_replace('#^[^:]*://[^/]/#', '', $remote);
192
        $remote = preg_replace('#\.git$#', '', $remote);
193
194
        return $remote;
195
    }
196
197
    protected function getRemote($remote = 'origin', $cwd = '')
198
    {

src/HubphAPI.php 1 location

@@ 77-84 (lines=8) @@
74
        return "https://{$token}:[email protected]/{$projectAndOrg}.git";
75
    }
76
77
    protected function projectAndOrgFromUrl($remote)
78
    {
79
        $remote = preg_replace('#^git@[^:]*:#', '', $remote);
80
        $remote = preg_replace('#^[^:]*://[^/]*/#', '', $remote);
81
        $remote = preg_replace('#\.git$#', '', $remote);
82
83
        return $remote;
84
    }
85
86
    protected function existingPRs($projectWithOrg, $vids)
87
    {