@@ -195,14 +195,14 @@ discard block |
||
195 | 195 | { |
196 | 196 | return [ |
197 | 197 | //contributors, dependencies, dependent_repositories, dependents, search, sourcerank, or project |
198 | - ['{"Hello":"World"}', 'contributors' , ['platform' => 'npm' , 'name' => 'utility']], |
|
199 | - ['{"Hello":"World"}', 'dependencies' , ['platform' => 'npm' , 'name' => 'utility', 'version' => 'latest']], |
|
200 | - ['{"Hello":"World"}', 'dependent_repositories', ['platform' => 'npm' , 'name' => 'utility']], |
|
201 | - ['{"Hello":"World"}', 'dependents' , ['platform' => 'npm' , 'name' => 'utility']], |
|
202 | - ['{"Hello":"World"}', 'search' , ['query' => 'grunt', 'sort' => 'rank', 'keywords' => 'wordpress']], |
|
203 | - ['{"Hello":"World"}', 'search' , ['query' => 'grunt', 'sort' => 'notvalid', 'keywords' => 'wordpress']], |
|
204 | - ['{"Hello":"World"}', 'sourcerank' , ['platform' => 'npm' , 'name' => 'utility']], |
|
205 | - ['{"Hello":"World"}', 'project' , ['platform' => 'npm' , 'name' => 'utility', 'page' => 1, 'per_page' => 30]] |
|
198 | + ['{"Hello":"World"}', 'contributors', ['platform' => 'npm', 'name' => 'utility']], |
|
199 | + ['{"Hello":"World"}', 'dependencies', ['platform' => 'npm', 'name' => 'utility', 'version' => 'latest']], |
|
200 | + ['{"Hello":"World"}', 'dependent_repositories', ['platform' => 'npm', 'name' => 'utility']], |
|
201 | + ['{"Hello":"World"}', 'dependents', ['platform' => 'npm', 'name' => 'utility']], |
|
202 | + ['{"Hello":"World"}', 'search', ['query' => 'grunt', 'sort' => 'rank', 'keywords' => 'wordpress']], |
|
203 | + ['{"Hello":"World"}', 'search', ['query' => 'grunt', 'sort' => 'notvalid', 'keywords' => 'wordpress']], |
|
204 | + ['{"Hello":"World"}', 'sourcerank', ['platform' => 'npm', 'name' => 'utility']], |
|
205 | + ['{"Hello":"World"}', 'project', ['platform' => 'npm', 'name' => 'utility', 'page' => 1, 'per_page' => 30]] |
|
206 | 206 | ]; |
207 | 207 | } |
208 | 208 | |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | { |
230 | 230 | $this->stub->client = $this->client; |
231 | 231 | $this->expectException(InvalidArgumentException::class); |
232 | - $response = $this->stub->project('notvalid', ['platform' => 'npm' , 'name' => 'utility']); |
|
232 | + $response = $this->stub->project('notvalid', ['platform' => 'npm', 'name' => 'utility']); |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | /** |
@@ -250,12 +250,12 @@ discard block |
||
250 | 250 | public static function dataRepositoryProvider(): array |
251 | 251 | { |
252 | 252 | return [ |
253 | - ['{"Hello":"World"}', 'dependencies' , ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
254 | - ['{"Hello":"World"}', 'projects' , ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
255 | - ['{"Hello":"World"}', 'repository' , ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
256 | - ['{"Hello":"World"}', 'dependencies' , ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
257 | - ['{"Hello":"World"}', 'projects' , ['owner' => 'ericsizemore', 'name' => 'utility', 'page' => 1, 'per_page' => 30]], |
|
258 | - ['{"Hello":"World"}', 'repository' , ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
253 | + ['{"Hello":"World"}', 'dependencies', ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
254 | + ['{"Hello":"World"}', 'projects', ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
255 | + ['{"Hello":"World"}', 'repository', ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
256 | + ['{"Hello":"World"}', 'dependencies', ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
257 | + ['{"Hello":"World"}', 'projects', ['owner' => 'ericsizemore', 'name' => 'utility', 'page' => 1, 'per_page' => 30]], |
|
258 | + ['{"Hello":"World"}', 'repository', ['owner' => 'ericsizemore', 'name' => 'utility']], |
|
259 | 259 | ]; |
260 | 260 | } |
261 | 261 | |
@@ -303,12 +303,12 @@ discard block |
||
303 | 303 | public static function dataUserProvider(): array |
304 | 304 | { |
305 | 305 | return [ |
306 | - ['{"Hello":"World"}', 'dependencies' , ['login' => 'ericsizemore']], |
|
307 | - ['{"Hello":"World"}', 'package_contributions' , ['login' => 'ericsizemore']], |
|
308 | - ['{"Hello":"World"}', 'packages' , ['login' => 'ericsizemore']], |
|
309 | - ['{"Hello":"World"}', 'repositories' , ['login' => 'ericsizemore']], |
|
306 | + ['{"Hello":"World"}', 'dependencies', ['login' => 'ericsizemore']], |
|
307 | + ['{"Hello":"World"}', 'package_contributions', ['login' => 'ericsizemore']], |
|
308 | + ['{"Hello":"World"}', 'packages', ['login' => 'ericsizemore']], |
|
309 | + ['{"Hello":"World"}', 'repositories', ['login' => 'ericsizemore']], |
|
310 | 310 | ['{"Hello":"World"}', 'repository_contributions', ['login' => 'ericsizemore', 'page' => 1, 'per_page' => 30]], |
311 | - ['{"Hello":"World"}', 'subscriptions' , []] |
|
311 | + ['{"Hello":"World"}', 'subscriptions', []] |
|
312 | 312 | ]; |
313 | 313 | } |
314 | 314 | |
@@ -356,9 +356,9 @@ discard block |
||
356 | 356 | public static function dataSubscriptionProvider(): array |
357 | 357 | { |
358 | 358 | return [ |
359 | - ['{"Hello":"World"}', 'subscribe' , ['platform' => 'npm', 'name' => 'utility', 'include_prerelease' => 'true']], |
|
360 | - ['{"Hello":"World"}', 'check' , ['platform' => 'npm', 'name' => 'utility']], |
|
361 | - ['{"Hello":"World"}', 'update' , ['platform' => 'npm', 'name' => 'utility', 'include_prerelease' => 'false']], |
|
359 | + ['{"Hello":"World"}', 'subscribe', ['platform' => 'npm', 'name' => 'utility', 'include_prerelease' => 'true']], |
|
360 | + ['{"Hello":"World"}', 'check', ['platform' => 'npm', 'name' => 'utility']], |
|
361 | + ['{"Hello":"World"}', 'update', ['platform' => 'npm', 'name' => 'utility', 'include_prerelease' => 'false']], |
|
362 | 362 | ['{"Hello":"World"}', 'unsubscribe', ['platform' => 'npm', 'name' => 'utility']] |
363 | 363 | ]; |
364 | 364 | } |
@@ -192,9 +192,9 @@ discard block |
||
192 | 192 | // Attempt the request |
193 | 193 | try { |
194 | 194 | return match($method) { |
195 | - 'get' => $this->client->get($endpoint), /** @phpstan-ignore-line **/ |
|
196 | - 'post' => $this->client->post($endpoint), /** @phpstan-ignore-line **/ |
|
197 | - 'put' => $this->client->put($endpoint), /** @phpstan-ignore-line **/ |
|
195 | + 'get' => $this->client->get($endpoint), /** @phpstan-ignore-line **/ |
|
196 | + 'post' => $this->client->post($endpoint), /** @phpstan-ignore-line **/ |
|
197 | + 'put' => $this->client->put($endpoint), /** @phpstan-ignore-line **/ |
|
198 | 198 | 'delete' => $this->client->delete($endpoint), /** @phpstan-ignore-line **/ |
199 | 199 | default => $this->client->get($endpoint) /** @phpstan-ignore-line **/ |
200 | 200 | }; |
@@ -429,29 +429,29 @@ discard block |
||
429 | 429 | protected function endpointParameters(string $endpoint, string $subset): array |
430 | 430 | { |
431 | 431 | static $projectParameters = [ |
432 | - 'contributors' => ['format' => ':platform/:name/contributors' , 'options' => ['platform', 'name']], |
|
433 | - 'dependencies' => ['format' => ':platform/:name/:version/dependencies' , 'options' => ['platform', 'name', 'version']], |
|
432 | + 'contributors' => ['format' => ':platform/:name/contributors', 'options' => ['platform', 'name']], |
|
433 | + 'dependencies' => ['format' => ':platform/:name/:version/dependencies', 'options' => ['platform', 'name', 'version']], |
|
434 | 434 | 'dependent_repositories' => ['format' => ':platform/:name/dependent_repositories', 'options' => ['platform', 'name']], |
435 | - 'dependents' => ['format' => ':platform/:name/dependents' , 'options' => ['platform', 'name']], |
|
436 | - 'search' => ['format' => 'search' , 'options' => ['query', 'sort']], |
|
437 | - 'sourcerank' => ['format' => ':platform/:name/sourcerank' , 'options' => ['platform', 'name']], |
|
438 | - 'project' => ['format' => ':platform/:name' , 'options' => ['platform', 'name']] |
|
435 | + 'dependents' => ['format' => ':platform/:name/dependents', 'options' => ['platform', 'name']], |
|
436 | + 'search' => ['format' => 'search', 'options' => ['query', 'sort']], |
|
437 | + 'sourcerank' => ['format' => ':platform/:name/sourcerank', 'options' => ['platform', 'name']], |
|
438 | + 'project' => ['format' => ':platform/:name', 'options' => ['platform', 'name']] |
|
439 | 439 | ]; |
440 | 440 | |
441 | 441 | static $repositoryParameters = [ |
442 | 442 | 'dependencies' => ['format' => 'github/:owner/:name/dependencies', 'options' => ['owner', 'name']], |
443 | - 'projects' => ['format' => 'github/:owner/:name/projects' , 'options' => ['owner', 'name']], |
|
444 | - 'repository' => ['format' => 'github/:owner/:name' , 'options' => ['owner', 'name']] |
|
443 | + 'projects' => ['format' => 'github/:owner/:name/projects', 'options' => ['owner', 'name']], |
|
444 | + 'repository' => ['format' => 'github/:owner/:name', 'options' => ['owner', 'name']] |
|
445 | 445 | ]; |
446 | 446 | |
447 | 447 | static $userParameters = [ |
448 | - 'dependencies' => ['format' => 'github/:login/dependencies' , 'options' => ['login']], |
|
449 | - 'package_contributions' => ['format' => 'github/:login/project-contributions' , 'options' => ['login']], |
|
450 | - 'packages' => ['format' => 'github/:login/projects' , 'options' => ['login']], |
|
451 | - 'repositories' => ['format' => 'github/:login/repositories' , 'options' => ['login']], |
|
448 | + 'dependencies' => ['format' => 'github/:login/dependencies', 'options' => ['login']], |
|
449 | + 'package_contributions' => ['format' => 'github/:login/project-contributions', 'options' => ['login']], |
|
450 | + 'packages' => ['format' => 'github/:login/projects', 'options' => ['login']], |
|
451 | + 'repositories' => ['format' => 'github/:login/repositories', 'options' => ['login']], |
|
452 | 452 | 'repository_contributions' => ['format' => 'github/:login/repository-contributions', 'options' => ['login']], |
453 | - 'subscriptions' => ['format' => 'subscriptions' , 'options' => []], |
|
454 | - 'user' => ['format' => 'github/:login' , 'options' => ['login']] |
|
453 | + 'subscriptions' => ['format' => 'subscriptions', 'options' => []], |
|
454 | + 'user' => ['format' => 'github/:login', 'options' => ['login']] |
|
455 | 455 | ]; |
456 | 456 | |
457 | 457 | static $subscriptionParameters = [ |