Skip to content

Commit 89921f3

Browse files
DEV-4690 - Formatting and naming changes
1 parent 979262b commit 89921f3

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/PrintfulApiClient.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class PrintfulApiClient
4848

4949
/**
5050
* @param string $key
51+
* @param string $type // OAuth token or Legacy Store Key
5152
* @throws \Printful\Exceptions\PrintfulException if the library failed to initialize
5253
*/
5354
public function __construct($key, $type = self::DEFAULT_KEY)
@@ -61,21 +62,21 @@ public function __construct($key, $type = self::DEFAULT_KEY)
6162
}
6263

6364
/**
64-
* @param string $key
65+
* @param string $oAuthToken
6566
* @throws PrintfulException
6667
*/
67-
public static function createOauthClient($key)
68+
public static function createOauthClient($oAuthToken)
6869
{
69-
return new self($key, self::TYPE_OAUTH_TOKEN);
70+
return new self($oAuthToken, self::TYPE_OAUTH_TOKEN);
7071
}
7172

7273
/**
73-
* @param string $key
74+
* @param string $legacyStoreKey
7475
* @throws PrintfulException
7576
*/
76-
public static function createLegacyStoreKeyClient($key)
77+
public static function createLegacyStoreKeyClient($legacyStoreKey)
7778
{
78-
return new self($key, self::TYPE_LEGACY_STORE_KEY);
79+
return new self($legacyStoreKey, self::TYPE_LEGACY_STORE_KEY);
7980
}
8081

8182
/**
@@ -226,7 +227,7 @@ private function request($method, $path, array $params = [], $data = null)
226227
}
227228

228229
/**
229-
* @param $curl resource
230+
* @param resource $curl
230231
* @throws PrintfulException
231232
*/
232233
private function setCredentials($curl)

tests/ApiClient/PrintfulApiClientTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
class PrintfulApiClientTest extends TestCase
1111
{
12-
1312
/**
1413
* @throws \Printful\Exceptions\PrintfulException
1514
* @throws \Printful\Exceptions\PrintfulApiException

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected function setUp()
2424

2525
if (Credentials::$oAuthToken !== '') {
2626
$this->api = PrintfulApiClient::createOauthClient(Credentials::$oAuthToken);
27-
} elseif (Credentials::$legacyStoreKey !== ''){
27+
} elseif (Credentials::$legacyStoreKey !== '') {
2828
$this->api = PrintfulApiClient::createLegacyStoreKeyClient(Credentials::$legacyStoreKey);
2929
} else {
3030
throw new \Exception('Printful test credentials are not set. Please enter a valid $oAuthToken or $legacyStoreKey in your tests/Credentials.php file');

0 commit comments

Comments
 (0)