Skip to content

Commit fcbabe5

Browse files
authored
Merge pull request #226 from Gemorroj/phpdoc
some phpdoc and other minor fixes
2 parents a386422 + 73634fa commit fcbabe5

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

src/Bigcommerce/Api/Client.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ private static function mapCount($object)
406406
/**
407407
* Swaps a temporary access code for a long expiry auth token.
408408
*
409-
* @param \stdClass $object
409+
* @param \stdClass|array $object
410410
* @return \stdClass
411411
*/
412412
public static function getAuthToken($object)
@@ -417,6 +417,12 @@ public static function getAuthToken($object)
417417
return $connection->post(self::$login_url . '/oauth2/token', $context);
418418
}
419419

420+
/**
421+
* @param int $id
422+
* @param string $redirectUrl
423+
* @param string $requestIp
424+
* @return string
425+
*/
420426
public static function getCustomerLoginToken($id, $redirectUrl = '', $requestIp = '')
421427
{
422428
if (empty(self::$client_secret)) {

src/Bigcommerce/Api/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ public function __construct()
9898
curl_setopt($this->curl, CURLOPT_HEADERFUNCTION, array($this, 'parseHeader'));
9999
curl_setopt($this->curl, CURLOPT_WRITEFUNCTION, array($this, 'parseBody'));
100100

101-
// Set to a blank string to make cURL include all encodings it can handle (gzip, deflate, identity) in the 'Accept-Encoding' request header and respect the 'Content-Encoding' response header
102-
curl_setopt($this->curl, CURLOPT_ENCODING, '');
101+
// Set to a blank string to make cURL include all encodings it can handle (gzip, deflate, identity) in the 'Accept-Encoding' request header and respect the 'Content-Encoding' response header
102+
curl_setopt($this->curl, CURLOPT_ENCODING, '');
103103

104104
if (!ini_get("open_basedir")) {
105105
curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, true);

src/Bigcommerce/Api/Filter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ class Filter
1212
/**
1313
* Factory method, creates an instance of a filter.
1414
* Used to build URLs to collection endpoints.
15+
* @param array $filter
16+
* @return $this
1517
*/
1618
public static function create($filter = array())
1719
{

src/Bigcommerce/Api/Resource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ private function isIgnoredField($field, $value)
100100
return true;
101101
}
102102

103-
if (strpos($field, "date") !== false && $value === "") {
103+
if ($value === "" && strpos($field, "date") !== false) {
104104
return true;
105105
}
106106

107-
if (in_array($field, $this->ignoreIfZero, true) && $value === 0) {
107+
if ($value === 0 && in_array($field, $this->ignoreIfZero, true)) {
108108
return true;
109109
}
110110

0 commit comments

Comments
 (0)