@@ -79,7 +79,7 @@ |
||
79 | 79 | if (!extension_loaded('openssl')) { |
80 | 80 | throw new RuntimeException( |
81 | 81 | 'OpenSSL extension is not loaded or actived, ' |
82 | - . 'please check your PHP configuration' |
|
82 | + . 'please check your PHP configuration' |
|
83 | 83 | ); |
84 | 84 | } |
85 | 85 |
@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | * Class OpenSSL |
55 | 55 | * @package Platine\Security\Encryption |
56 | 56 | */ |
57 | -class OpenSSL implements AdapterInterface |
|
58 | -{ |
|
57 | +class OpenSSL implements AdapterInterface { |
|
59 | 58 | /** |
60 | 59 | * OpenSSL cipher method constant |
61 | 60 | * @var string |
@@ -73,8 +72,7 @@ discard block |
||
73 | 72 | * Create new instance |
74 | 73 | * @param array<string, mixed> $config |
75 | 74 | */ |
76 | - public function __construct(array $config = []) |
|
77 | - { |
|
75 | + public function __construct(array $config = []) { |
|
78 | 76 | if (!extension_loaded('openssl')) { |
79 | 77 | throw new RuntimeException( |
80 | 78 | 'OpenSSL extension is not loaded or actived, ' |
@@ -51,8 +51,7 @@ |
||
51 | 51 | * Class HashInterface |
52 | 52 | * @package Platine\Security\Hash |
53 | 53 | */ |
54 | -interface HashInterface |
|
55 | -{ |
|
54 | +interface HashInterface { |
|
56 | 55 | /** |
57 | 56 | * Hash the given string |
58 | 57 | * @param string $plain |
@@ -39,6 +39,5 @@ |
||
39 | 39 | * Class HashException |
40 | 40 | * @package Platine\Security\Exception |
41 | 41 | */ |
42 | -class HashException extends Exception |
|
43 | -{ |
|
42 | +class HashException extends Exception { |
|
44 | 43 | } |
@@ -39,6 +39,5 @@ |
||
39 | 39 | * Class EncryptionException |
40 | 40 | * @package Platine\Security\Exception |
41 | 41 | */ |
42 | -class EncryptionException extends Exception |
|
43 | -{ |
|
42 | +class EncryptionException extends Exception { |
|
44 | 43 | } |
@@ -51,8 +51,7 @@ discard block |
||
51 | 51 | * Class Cipher |
52 | 52 | * @package Platine\Security\Encryption |
53 | 53 | */ |
54 | -class Cipher |
|
55 | -{ |
|
54 | +class Cipher { |
|
56 | 55 | /** |
57 | 56 | * The data to use for encryption/decryption |
58 | 57 | * @var string |
@@ -76,8 +75,7 @@ discard block |
||
76 | 75 | * @param string $data |
77 | 76 | * @param string $key |
78 | 77 | */ |
79 | - public function __construct(string $data, string $key) |
|
80 | - { |
|
78 | + public function __construct(string $data, string $key) { |
|
81 | 79 | $this->data = $data; |
82 | 80 | $this->key = sha1($key); |
83 | 81 | } |
@@ -51,8 +51,7 @@ |
||
51 | 51 | * Class AdapterInterface |
52 | 52 | * @package Platine\Security\Encryption |
53 | 53 | */ |
54 | -interface AdapterInterface |
|
55 | -{ |
|
54 | +interface AdapterInterface { |
|
56 | 55 | /** |
57 | 56 | * Create the initialization vector |
58 | 57 | * @param int $size |
@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | * Class Lang |
58 | 58 | * @package Platine\Security |
59 | 59 | */ |
60 | -class Encryption |
|
61 | -{ |
|
60 | +class Encryption { |
|
62 | 61 | /** |
63 | 62 | * The adapter instance |
64 | 63 | * @var AdapterInterface |
@@ -87,8 +86,7 @@ discard block |
||
87 | 86 | * Create new instance |
88 | 87 | * @param AdapterInterface|null $adapter |
89 | 88 | */ |
90 | - public function __construct(AdapterInterface $adapter = null) |
|
91 | - { |
|
89 | + public function __construct(AdapterInterface $adapter = null) { |
|
92 | 90 | $this->adapter = $adapter ? $adapter : new OpenSSL([]); |
93 | 91 | $this->initVectorSize = $this->adapter->getIVSize(); |
94 | 92 | } |
@@ -53,8 +53,7 @@ |
||
53 | 53 | * Class BcryptHash |
54 | 54 | * @package Platine\Security\Hash |
55 | 55 | */ |
56 | -class BcryptHash implements HashInterface |
|
57 | -{ |
|
56 | +class BcryptHash implements HashInterface { |
|
58 | 57 | /** |
59 | 58 | * {@inhereitdoc} |
60 | 59 | */ |