Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
freyhsiao committed Oct 22, 2019
1 parent b6eaf2c commit afc0667
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Plugins/GetFederationToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function handle($path = '*', $seconds = 7200, Closure $customPolicy = nul
{
$policy = !is_null($customPolicy)
? $this->getCustomPolicy($customPolicy, $path)
: $this->getPolicy($path);
: $this->getDefaultPolicy($path);

$params = [
'durationSeconds' => $seconds,
Expand Down Expand Up @@ -65,7 +65,7 @@ protected function getCustomPolicy(Closure $callable, $path)
*
* @return string
*/
protected function getPolicy($path)
protected function getDefaultPolicy($path)
{
$appId = $this->getCredentials()['appId'];

Expand Down
8 changes: 5 additions & 3 deletions src/Plugins/GetFederationTokenV3.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,17 @@ public function handle($path = '*', $seconds = 7200, Closure $customPolicy = nul
{
$policy = !is_null($customPolicy)
? $this->getCustomPolicy($customPolicy, $path)
: $this->getPolicy($path);
: $this->getDefaultPolicy($path);

$params = [
'DurationSeconds' => $seconds,
'Name' => $name,
'Policy' => urlencode($policy),
];

return $this->request($params, 'GetFederationToken', 'sts', '2018-08-13');
return $this->request(
$params, 'GetFederationToken', 'sts', '2018-08-13'
);
}

/**
Expand All @@ -70,7 +72,7 @@ protected function getCustomPolicy(Closure $callable, $path)
*
* @return string
*/
protected function getPolicy($path)
protected function getDefaultPolicy($path)
{
$appId = $this->getCredentials()['appId'];

Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/Traits/TencentCloudAuthV3.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected function getCredentials()
* @param string $action
* @param string $service
* @param string $version
* @param null $timestamp
* @param string|integer|null $timestamp
*
* @return bool|array
*/
Expand Down

0 comments on commit afc0667

Please sign in to comment.