Code Duplication    Length = 19-21 lines in 2 locations

lib/GitHub/Receiver/Repositories.php 2 locations

@@ 120-138 (lines=19) @@
117
     *
118
     * @return array
119
     */
120
    public function createRepository(string $name, string $description = '', string $homepage = '',
121
                                     bool $private = false, bool $hasIssues = true, bool $hasWiki = true,
122
                                     bool $hasDownloads = true, int $teamId = 0, bool $autoInit = false,
123
                                     string $gitignoreTemplate = '', string $licenseTemplate = ''): array
124
    {
125
        return $this->getApi()->request(sprintf('/user/repos'), Request::METHOD_POST, [
126
                'name'               => $name,
127
                'description'        => $description,
128
                'homepage'           => $homepage,
129
                'private'            => $private,
130
                'has_issues'         => $hasIssues,
131
                'has_wiki'           => $hasWiki,
132
                'has_downloads'      => $hasDownloads,
133
                'team_id'            => $teamId,
134
                'auto_init'          => $autoInit,
135
                'gitignore_template' => $gitignoreTemplate,
136
                'license_template'   => $licenseTemplate
137
            ]);
138
    }
139
140
    /**
141
     * Create a new repository in this organization. The authenticated user must be a member of the specified
@@ 161-181 (lines=21) @@
158
     *
159
     * @return array
160
     */
161
    public function createOrganizationRepository(string $organization, string $name, string $description = '',
162
                                                 string $homepage = '', bool $private = false, bool $hasIssues = true,
163
                                                 bool $hasWiki = true, bool $hasDownloads = true, int $teamId = 0,
164
                                                 bool $autoInit = false, string $gitignoreTemplate = '',
165
                                                 string $licenseTemplate = ''): array
166
    {
167
        return $this->getApi()->request($this->getApi()->sprintf('/orgs/:org/repos', $organization),
168
            Request::METHOD_POST, [
169
                'name'               => $name,
170
                'description'        => $description,
171
                'homepage'           => $homepage,
172
                'private'            => $private,
173
                'has_issues'         => $hasIssues,
174
                'has_wiki'           => $hasWiki,
175
                'has_downloads'      => $hasDownloads,
176
                'team_id'            => $teamId,
177
                'auto_init'          => $autoInit,
178
                'gitignore_template' => $gitignoreTemplate,
179
                'license_template'   => $licenseTemplate
180
            ]);
181
    }
182
183
    /**
184
     * Get