Skip to content

Commit

Permalink
Merge 4159699 into 51602e7
Browse files Browse the repository at this point in the history
  • Loading branch information
betacar committed Nov 4, 2020
2 parents 51602e7 + 4159699 commit 7a89075
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
@@ -1,7 +1,7 @@
{
"name": "bynder/bynder-php-sdk",
"description": "Bynder PHP Library",
"version": "2.1.1",
"version": "2.1.2",
"keywords": [
"bynder",
"sdk",
Expand Down
7 changes: 4 additions & 3 deletions src/Bynder/Api/Impl/OAuth2/Configuration.php
Expand Up @@ -17,7 +17,7 @@
class Configuration
{
private $bynderDomain;

private $rootDir;
private $redirectUri;

/**
Expand Down Expand Up @@ -52,7 +52,8 @@ public function __construct($bynderDomain, $redirectUri, $clientId, $clientSecre
$this->clientSecret = $clientSecret;
$this->token = $token;
$this->requestOptions = $requestOptions;
$this->package = json_decode(file_get_contents('composer.json'));
$this->rootDir = dirname(__FILE__, 6);
$this->package = json_decode(file_get_contents($this->rootDir . '/composer.json'));
$this->initialToken = $token;
}

Expand Down Expand Up @@ -145,6 +146,6 @@ public function setRequestOptions(array $requestOptions)
*/
public function getSdkVersion()
{
return $this->package['version'];
return $this->package->version;
}
}
6 changes: 4 additions & 2 deletions src/Bynder/Api/Impl/PermanentTokens/Configuration.php
Expand Up @@ -12,6 +12,7 @@
class Configuration
{
private $bynderDomain;
private $rootDir;

/**
* @var string Permanent token.
Expand All @@ -30,7 +31,8 @@ public function __construct($bynderDomain, $token, $requestOptions = [])
$this->bynderDomain = $bynderDomain;
$this->token = $token;
$this->requestOptions = $requestOptions;
$this->package = json_decode(file_get_contents('composer.json'));
$this->rootDir = dirname(__FILE__, 6);
$this->package = json_decode(file_get_contents($this->rootDir . '/composer.json'));
}

public function getBynderDomain()
Expand Down Expand Up @@ -80,6 +82,6 @@ public function setRequestOptions(array $requestOptions)
*/
public function getSdkVersion()
{
return $this->package['version'];
return $this->package->version;
}
}

0 comments on commit 7a89075

Please sign in to comment.