@@ -373,29 +373,29 @@ |
||
373 | 373 | private static function endpointParameters(string $endpoint, string $subset): array |
374 | 374 | { |
375 | 375 | static $projectParameters = [ |
376 | - 'contributors' => ['format' => ':platform/:name/contributors' , 'options' => ['platform', 'name']], |
|
377 | - 'dependencies' => ['format' => ':platform/:name/:version/dependencies' , 'options' => ['platform', 'name', 'version']], |
|
376 | + 'contributors' => ['format' => ':platform/:name/contributors', 'options' => ['platform', 'name']], |
|
377 | + 'dependencies' => ['format' => ':platform/:name/:version/dependencies', 'options' => ['platform', 'name', 'version']], |
|
378 | 378 | 'dependent_repositories' => ['format' => ':platform/:name/dependent_repositories', 'options' => ['platform', 'name']], |
379 | - 'dependents' => ['format' => ':platform/:name/dependents' , 'options' => ['platform', 'name']], |
|
380 | - 'search' => ['format' => 'search' , 'options' => ['query', 'sort']], |
|
381 | - 'sourcerank' => ['format' => ':platform/:name/sourcerank' , 'options' => ['platform', 'name']], |
|
382 | - 'project' => ['format' => ':platform/:name' , 'options' => ['platform', 'name']] |
|
379 | + 'dependents' => ['format' => ':platform/:name/dependents', 'options' => ['platform', 'name']], |
|
380 | + 'search' => ['format' => 'search', 'options' => ['query', 'sort']], |
|
381 | + 'sourcerank' => ['format' => ':platform/:name/sourcerank', 'options' => ['platform', 'name']], |
|
382 | + 'project' => ['format' => ':platform/:name', 'options' => ['platform', 'name']] |
|
383 | 383 | ]; |
384 | 384 | |
385 | 385 | static $repositoryParameters = [ |
386 | 386 | 'dependencies' => ['format' => 'github/:owner/:name/dependencies', 'options' => ['owner', 'name']], |
387 | - 'projects' => ['format' => 'github/:owner/:name/projects' , 'options' => ['owner', 'name']], |
|
388 | - 'repository' => ['format' => 'github/:owner/:name' , 'options' => ['owner', 'name']] |
|
387 | + 'projects' => ['format' => 'github/:owner/:name/projects', 'options' => ['owner', 'name']], |
|
388 | + 'repository' => ['format' => 'github/:owner/:name', 'options' => ['owner', 'name']] |
|
389 | 389 | ]; |
390 | 390 | |
391 | 391 | static $userParameters = [ |
392 | - 'dependencies' => ['format' => 'github/:login/dependencies' , 'options' => ['login']], |
|
393 | - 'package_contributions' => ['format' => 'github/:login/project-contributions' , 'options' => ['login']], |
|
394 | - 'packages' => ['format' => 'github/:login/projects' , 'options' => ['login']], |
|
395 | - 'repositories' => ['format' => 'github/:login/repositories' , 'options' => ['login']], |
|
392 | + 'dependencies' => ['format' => 'github/:login/dependencies', 'options' => ['login']], |
|
393 | + 'package_contributions' => ['format' => 'github/:login/project-contributions', 'options' => ['login']], |
|
394 | + 'packages' => ['format' => 'github/:login/projects', 'options' => ['login']], |
|
395 | + 'repositories' => ['format' => 'github/:login/repositories', 'options' => ['login']], |
|
396 | 396 | 'repository_contributions' => ['format' => 'github/:login/repository-contributions', 'options' => ['login']], |
397 | - 'subscriptions' => ['format' => 'subscriptions' , 'options' => []], |
|
398 | - 'user' => ['format' => 'github/:login' , 'options' => ['login']] |
|
397 | + 'subscriptions' => ['format' => 'subscriptions', 'options' => []], |
|
398 | + 'user' => ['format' => 'github/:login', 'options' => ['login']] |
|
399 | 399 | ]; |
400 | 400 | |
401 | 401 | static $subscriptionParameters = [ |
@@ -177,14 +177,14 @@ discard block |
||
177 | 177 | public static function dataProjectProvider(): array |
178 | 178 | { |
179 | 179 | return [ |
180 | - ['{"Hello":"World"}', 'contributors' , ['platform' => 'npm' , 'name' => 'utility']], |
|
181 | - ['{"Hello":"World"}', 'dependencies' , ['platform' => 'npm' , 'name' => 'utility', 'version' => 'latest']], |
|
182 | - ['{"Hello":"World"}', 'dependent_repositories', ['platform' => 'npm' , 'name' => 'utility']], |
|
183 | - ['{"Hello":"World"}', 'dependents' , ['platform' => 'npm' , 'name' => 'utility']], |
|
184 | - ['{"Hello":"World"}', 'search' , ['query' => 'grunt', 'sort' => 'rank', 'keywords' => 'wordpress']], |
|
185 | - ['{"Hello":"World"}', 'search' , ['query' => 'grunt', 'sort' => 'notvalid', 'keywords' => 'wordpress']], |
|
186 | - ['{"Hello":"World"}', 'sourcerank' , ['platform' => 'npm' , 'name' => 'utility']], |
|
187 | - ['{"Hello":"World"}', 'project' , ['platform' => 'npm' , 'name' => 'utility', 'page' => 1, 'per_page' => 30]] |
|
180 | + ['{"Hello":"World"}', 'contributors', ['platform' => 'npm', 'name' => 'utility']], |
|
181 | + ['{"Hello":"World"}', 'dependencies', ['platform' => 'npm', 'name' => 'utility', 'version' => 'latest']], |
|
182 | + ['{"Hello":"World"}', 'dependent_repositories', ['platform' => 'npm', 'name' => 'utility']], |
|
183 | + ['{"Hello":"World"}', 'dependents', ['platform' => 'npm', 'name' => 'utility']], |
|
184 | + ['{"Hello":"World"}', 'search', ['query' => 'grunt', 'sort' => 'rank', 'keywords' => 'wordpress']], |
|
185 | + ['{"Hello":"World"}', 'search', ['query' => 'grunt', 'sort' => 'notvalid', 'keywords' => 'wordpress']], |
|
186 | + ['{"Hello":"World"}', 'sourcerank', ['platform' => 'npm', 'name' => 'utility']], |
|
187 | + ['{"Hello":"World"}', 'project', ['platform' => 'npm', 'name' => 'utility', 'page' => 1, 'per_page' => 30]] |
|
188 | 188 | ]; |
189 | 189 | } |
190 | 190 | /** |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | { |
208 | 208 | $this->stub->client = $this->client; |
209 | 209 | $this->expectException(InvalidArgumentException::class); |
210 | - $this->stub->project('notvalid', ['platform' => 'npm' , 'name' => 'utility']); |
|
210 | + $this->stub->project('notvalid', ['platform' => 'npm', 'name' => 'utility']); |
|
211 | 211 | } |
212 | 212 | /** |
213 | 213 | * Test the platform endpoint with n valid subset $endpoint arg and invalid $options specified. |
@@ -226,12 +226,12 @@ discard block |
||
226 | 226 | public static function dataRepositoryProvider(): array |
227 | 227 | { |
228 | 228 | return [ |
229 | - ['{"Hello":"World"}', 'dependencies' , ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
230 | - ['{"Hello":"World"}', 'projects' , ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
231 | - ['{"Hello":"World"}', 'repository' , ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
232 | - ['{"Hello":"World"}', 'dependencies' , ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
233 | - ['{"Hello":"World"}', 'projects' , ['owner' => 'ericsizemore', 'name' => 'utility', 'page' => 1, 'per_page' => 30]], |
|
234 | - ['{"Hello":"World"}', 'repository' , ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
229 | + ['{"Hello":"World"}', 'dependencies', ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
230 | + ['{"Hello":"World"}', 'projects', ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
231 | + ['{"Hello":"World"}', 'repository', ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
232 | + ['{"Hello":"World"}', 'dependencies', ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
233 | + ['{"Hello":"World"}', 'projects', ['owner' => 'ericsizemore', 'name' => 'utility', 'page' => 1, 'per_page' => 30]], |
|
234 | + ['{"Hello":"World"}', 'repository', ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
235 | 235 | ]; |
236 | 236 | } |
237 | 237 | /** |
@@ -273,12 +273,12 @@ discard block |
||
273 | 273 | public static function dataUserProvider(): array |
274 | 274 | { |
275 | 275 | return [ |
276 | - ['{"Hello":"World"}', 'dependencies' , ['login' => 'ericsizemore']], |
|
277 | - ['{"Hello":"World"}', 'package_contributions' , ['login' => 'ericsizemore']], |
|
278 | - ['{"Hello":"World"}', 'packages' , ['login' => 'ericsizemore']], |
|
279 | - ['{"Hello":"World"}', 'repositories' , ['login' => 'ericsizemore']], |
|
276 | + ['{"Hello":"World"}', 'dependencies', ['login' => 'ericsizemore']], |
|
277 | + ['{"Hello":"World"}', 'package_contributions', ['login' => 'ericsizemore']], |
|
278 | + ['{"Hello":"World"}', 'packages', ['login' => 'ericsizemore']], |
|
279 | + ['{"Hello":"World"}', 'repositories', ['login' => 'ericsizemore']], |
|
280 | 280 | ['{"Hello":"World"}', 'repository_contributions', ['login' => 'ericsizemore', 'page' => 1, 'per_page' => 30]], |
281 | - ['{"Hello":"World"}', 'subscriptions' , []] |
|
281 | + ['{"Hello":"World"}', 'subscriptions', []] |
|
282 | 282 | ]; |
283 | 283 | } |
284 | 284 | /** |
@@ -320,9 +320,9 @@ discard block |
||
320 | 320 | public static function dataSubscriptionProvider(): array |
321 | 321 | { |
322 | 322 | return [ |
323 | - ['{"Hello":"World"}', 'subscribe' , ['platform' => 'npm', 'name' => 'utility', 'include_prerelease' => 'true']], |
|
324 | - ['{"Hello":"World"}', 'check' , ['platform' => 'npm', 'name' => 'utility']], |
|
325 | - ['{"Hello":"World"}', 'update' , ['platform' => 'npm', 'name' => 'utility', 'include_prerelease' => 'false']], |
|
323 | + ['{"Hello":"World"}', 'subscribe', ['platform' => 'npm', 'name' => 'utility', 'include_prerelease' => 'true']], |
|
324 | + ['{"Hello":"World"}', 'check', ['platform' => 'npm', 'name' => 'utility']], |
|
325 | + ['{"Hello":"World"}', 'update', ['platform' => 'npm', 'name' => 'utility', 'include_prerelease' => 'false']], |
|
326 | 326 | ['{"Hello":"World"}', 'unsubscribe', ['platform' => 'npm', 'name' => 'utility']] |
327 | 327 | ]; |
328 | 328 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | use Rector\PHPUnit\Set\PHPUnitLevelSetList; |
10 | 10 | use Rector\CodeQuality\Rector\ClassMethod\LocallyCalledStaticMethodToNonStaticRector; |
11 | 11 | |
12 | -return static function (RectorConfig $rectorConfig): void { |
|
12 | +return static function(RectorConfig $rectorConfig): void { |
|
13 | 13 | $rectorConfig->paths([ |
14 | 14 | __DIR__ . '/src', |
15 | 15 | //__DIR__ . '/tests/src', |