mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 08:23:03 +05:30
Fix StyleCI issues and remove phpdoc order from StyleCI
This commit is contained in:
parent
00a7972f74
commit
c9b07f386c
@ -29,7 +29,6 @@ enabled:
|
|||||||
- phpdoc_inline_tag
|
- phpdoc_inline_tag
|
||||||
- phpdoc_no_access
|
- phpdoc_no_access
|
||||||
- phpdoc_no_simplified_null_return
|
- phpdoc_no_simplified_null_return
|
||||||
- phpdoc_order
|
|
||||||
- phpdoc_property
|
- phpdoc_property
|
||||||
- phpdoc_scalar
|
- phpdoc_scalar
|
||||||
- phpdoc_separation
|
- phpdoc_separation
|
||||||
|
@ -33,7 +33,7 @@ trait CryptTrait
|
|||||||
protected function encrypt($unencryptedData)
|
protected function encrypt($unencryptedData)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if($this->encryptionKey instanceof Key) {
|
if ($this->encryptionKey instanceof Key) {
|
||||||
return Crypto::encrypt($unencryptedData, $this->encryptionKey);
|
return Crypto::encrypt($unencryptedData, $this->encryptionKey);
|
||||||
} else {
|
} else {
|
||||||
return Crypto::encryptWithPassword($unencryptedData, $this->encryptionKey);
|
return Crypto::encryptWithPassword($unencryptedData, $this->encryptionKey);
|
||||||
@ -55,7 +55,7 @@ trait CryptTrait
|
|||||||
protected function decrypt($encryptedData)
|
protected function decrypt($encryptedData)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if($this->encryptionKey instanceof Key) {
|
if ($this->encryptionKey instanceof Key) {
|
||||||
return Crypto::decrypt($encryptedData, $this->encryptionKey);
|
return Crypto::decrypt($encryptedData, $this->encryptionKey);
|
||||||
} else {
|
} else {
|
||||||
return Crypto::decryptWithPassword($encryptedData, $this->encryptionKey);
|
return Crypto::decryptWithPassword($encryptedData, $this->encryptionKey);
|
||||||
|
@ -24,8 +24,8 @@ class CryptTraitTest extends TestCase
|
|||||||
return $this->encryptDecrypt($cryptStub);
|
return $this->encryptDecrypt($cryptStub);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function encryptDecrypt(CryptTraitStub $cryptStub) {
|
protected function encryptDecrypt(CryptTraitStub $cryptStub)
|
||||||
|
{
|
||||||
$payload = 'alex loves whisky';
|
$payload = 'alex loves whisky';
|
||||||
$encrypted = $cryptStub->doEncrypt($payload);
|
$encrypted = $cryptStub->doEncrypt($payload);
|
||||||
$plainText = $cryptStub->doDecrypt($encrypted);
|
$plainText = $cryptStub->doDecrypt($encrypted);
|
||||||
|
Loading…
Reference in New Issue
Block a user