Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply fixes from StyleCI #1

Merged
merged 1 commit into from
Dec 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
return [
// default signer
'default' => 'hmac',
'hmac' => [
'driver' => 'HMAC',
'hmac' => [
'driver' => 'HMAC',
'options' => [
// default algo
'algo' => env('SIGNATURE_HMAC_ALGO', 'sha1'),
Expand All @@ -13,7 +13,7 @@
],
],
'rsa' => [
'driver' => 'RSA',
'driver' => 'RSA',
'options' => [
//default algo
'algo' => env('SIGNATURE_RSA_ALGO', 'sha1'),
Expand Down
2 changes: 1 addition & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Liyu\Signature;

use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
use Illuminate\Foundation\Application as LaravelApplication;
use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
use Laravel\Lumen\Application as LumenApplication;

class ServiceProvider extends LaravelServiceProvider
Expand Down
4 changes: 2 additions & 2 deletions src/SignatureManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Liyu\Signature;

use InvalidArgumentException;
use Liyu\Signature\Signer\RSA;
use Liyu\Signature\Signer\HMAC;
use Liyu\Signature\Contracts\Signer;
use Liyu\Signature\Signer\HMAC;
use Liyu\Signature\Signer\RSA;

class SignatureManager
{
Expand Down
6 changes: 3 additions & 3 deletions src/Signer/AbstractSigner.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ protected function sort($params)
$params = array_filter($params);
ksort($params);
array_walk($params, $deepSort);
} else {
} else {
// convert item to tring
$params = (string)$params;
}
$params = (string) $params;
}

return $params;
};
Expand Down
2 changes: 1 addition & 1 deletion src/Signer/HMAC.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class HMAC extends AbstractSigner implements Signer
*/
protected $algo;

public function __construct(Array $config = [])
public function __construct(array $config = [])
{
$this->setConfig($config);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Signer/RSA.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class RSA extends AbstractSigner implements Signer
/**
* Constructor.
*
* @param Array $config
* @param array $config
*/
public function __construct(Array $config = [])
public function __construct(array $config = [])
{
$this->setConfig($config);
}
Expand Down