Skip to content

Commit 639f395

Browse files
authored
Merge pull request #19 from packagist/t/credential-argument-naming
Fix: credential argument naming
2 parents 92b7190 + a67c09e commit 639f395

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/Api/Packages.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,44 +43,44 @@ public function show($packageName)
4343
return $this->get(sprintf('/packages/%s/', $packageName));
4444
}
4545

46-
public function createVcsPackage($url, $credentials = null)
46+
public function createVcsPackage($url, $credentialId = null)
4747
{
48-
return $this->post('/packages/', ['repoType' => 'vcs', 'repoUrl' => $url, 'credentials' => $credentials]);
48+
return $this->post('/packages/', ['repoType' => 'vcs', 'repoUrl' => $url, 'credentials' => $credentialId]);
4949
}
5050

51-
public function createCustomPackage($customJson, $credentials = null)
51+
public function createCustomPackage($customJson, $credentialId = null)
5252
{
5353
if (is_array($customJson) || is_object($customJson)) {
5454
$customJson = json_encode($customJson);
5555
}
5656

57-
return $this->post('/packages/', ['repoType' => 'package', 'repoConfig' => $customJson, 'credentials' => $credentials]);
57+
return $this->post('/packages/', ['repoType' => 'package', 'repoConfig' => $customJson, 'credentials' => $credentialId]);
5858
}
5959

6060
/**
6161
* @deprecated Use editVcsPackage instead
6262
*/
63-
public function updateVcsPackage($packageName, $url, $credentials = null)
63+
public function updateVcsPackage($packageName, $url, $credentialId = null)
6464
{
65-
return $this->editVcsPackage($packageName, $url, $credentials);
65+
return $this->editVcsPackage($packageName, $url, $credentialId);
6666
}
6767

68-
public function editVcsPackage($packageName, $url, $credentials = null)
68+
public function editVcsPackage($packageName, $url, $credentialId = null)
6969
{
70-
return $this->put(sprintf('/packages/%s/', $packageName), ['repoType' => 'vcs', 'repoUrl' => $url, 'credentials' => $credentials]);
70+
return $this->put(sprintf('/packages/%s/', $packageName), ['repoType' => 'vcs', 'repoUrl' => $url, 'credentials' => $credentialId]);
7171
}
7272

7373
/**
7474
* @deprecated Use editCustomPackage instead
7575
*/
76-
public function updateCustomPackage($packageName, $customJson, $credentials = null)
76+
public function updateCustomPackage($packageName, $customJson, $credentialId = null)
7777
{
78-
return $this->editVcsPackage($packageName, $customJson, $credentials);
78+
return $this->editVcsPackage($packageName, $customJson, $credentialId);
7979
}
8080

81-
public function editCustomPackage($packageName, $customJson, $credentials = null)
81+
public function editCustomPackage($packageName, $customJson, $credentialId = null)
8282
{
83-
return $this->put(sprintf('/packages/%s/', $packageName), ['repoType' => 'package', 'repoConfig' => $customJson, 'credentials' => $credentials]);
83+
return $this->put(sprintf('/packages/%s/', $packageName), ['repoType' => 'package', 'repoConfig' => $customJson, 'credentials' => $credentialId]);
8484
}
8585

8686
public function remove($packageName)

0 commit comments

Comments
 (0)