Code Duplication    Length = 7-9 lines in 3 locations

lib/GitHub/Receiver/Organizations/Teams.php 1 location

@@ 83-91 (lines=9) @@
80
     * @return array
81
     * @throws \Exception
82
     */
83
    public function editTeam(int $id, string $name, string $description = null,
84
                             string $permission = AbstractApi::PERMISSION_PULL): array
85
    {
86
        return $this->getApi()->request($this->getApi()->sprintf('/teams/:id', (string)$id), Request::METHOD_PATCH, [
87
                'name'        => $name,
88
                'description' => $description,
89
                'permission'  => $permission
90
            ]);
91
    }
92
93
    /**
94
     * Delete team

lib/GitHub/Receiver/Repositories.php 2 locations

@@ 42-48 (lines=7) @@
39
     *
40
     * @return array
41
     */
42
    public function listYourRepositories(string $type = AbstractApi::TYPE_ALL,
43
                                         string $sort = AbstractApi::SORT_FULL_NAME,
44
                                         string $direction = AbstractApi::DIRECTION_DESC): array
45
    {
46
        return $this->getApi()->request($this->getApi()->sprintf('/user/repos?:args',
47
            http_build_query(['type' => $type, 'sort' => $sort, 'direction' => $direction])));
48
    }
49
50
    /**
51
     * List public repositories for the specified user.
@@ 62-68 (lines=7) @@
59
     *
60
     * @return array
61
     */
62
    public function listUserRepositories(string $username, string $type = AbstractApi::TYPE_OWNER,
63
                                         string $sort = AbstractApi::SORT_FULL_NAME,
64
                                         string $direction = AbstractApi::DIRECTION_DESC): array
65
    {
66
        return $this->getApi()->request($this->getApi()->sprintf('/users/:username/repos?:args', $username,
67
            http_build_query(['type' => $type, 'sort' => $sort, 'direction' => $direction])));
68
    }
69
70
    /**
71
     * List repositories for the specified org.