Skip to content

Commit c3f5bae

Browse files
committed
refactor: cs fix
1 parent 2ad2e97 commit c3f5bae

4 files changed

Lines changed: 11 additions & 16 deletions

File tree

system/Config/BaseConfig.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,9 @@ public function __construct()
134134
if ($property === 'key') {
135135
$this->{$property} = $this->parseEncryptionKey($this->{$property});
136136
} elseif ($property === 'previousKeys') {
137-
$keysArray = array_map('trim', explode(',', $this->{$property}));
138-
$parsedKeys = [];
137+
$keysArray = array_map('trim', explode(',', $this->{$property}));
138+
$parsedKeys = [];
139+
139140
foreach ($keysArray as $key) {
140141
$parsedKeys[] = $this->parseEncryptionKey($key);
141142
}

system/Encryption/Encryption.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ class Encryption
5555

5656
/**
5757
* Comma-separated list of previous keys for fallback decryption.
58-
*
59-
* @var string
6058
*/
6159
protected string $previousKeys = '';
6260

@@ -98,10 +96,10 @@ public function __construct(?EncryptionConfig $config = null)
9896
{
9997
$config ??= new EncryptionConfig();
10098

101-
$this->key = $config->key;
102-
$this->previousKeys = $config->previousKeys;
103-
$this->driver = $config->driver;
104-
$this->digest = $config->digest ?? 'SHA512';
99+
$this->key = $config->key;
100+
$this->previousKeys = $config->previousKeys;
101+
$this->driver = $config->driver;
102+
$this->digest = $config->digest ?? 'SHA512';
105103

106104
$this->handlers = [
107105
'OpenSSL' => extension_loaded('openssl'),
@@ -124,10 +122,10 @@ public function __construct(?EncryptionConfig $config = null)
124122
public function initialize(?EncryptionConfig $config = null)
125123
{
126124
if ($config instanceof EncryptionConfig) {
127-
$this->key = $config->key;
128-
$this->previousKeys = $config->previousKeys ?? '';
129-
$this->driver = $config->driver;
130-
$this->digest = $config->digest ?? 'SHA512';
125+
$this->key = $config->key;
126+
$this->previousKeys = $config->previousKeys ?? '';
127+
$this->driver = $config->driver;
128+
$this->digest = $config->digest ?? 'SHA512';
131129
}
132130

133131
if (empty($this->driver)) {

system/Encryption/Handlers/OpenSSLHandler.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ class OpenSSLHandler extends BaseHandler
5757

5858
/**
5959
* List of previous keys for fallback decryption.
60-
*
61-
* @var string
6260
*/
6361
protected string $previousKeys = '';
6462

system/Encryption/Handlers/SodiumHandler.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ class SodiumHandler extends BaseHandler
3232

3333
/**
3434
* List of previous keys for fallback decryption.
35-
*
36-
* @var string
3735
*/
3836
protected string $previousKeys = '';
3937

0 commit comments

Comments
 (0)