@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | namespace chillerlan\Traits\Crypto; |
14 | 14 | |
15 | -class SignedMessage extends CryptoBox{ |
|
15 | +class SignedMessage extends CryptoBox { |
|
16 | 16 | |
17 | 17 | /** @inheritdoc */ |
18 | 18 | public function create(string &$message):CryptoBoxInterface{ |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | sodium_memzero($box_bin); |
35 | 35 | |
36 | - if($this->message === false){ |
|
36 | + if ($this->message === false) { |
|
37 | 37 | throw new CryptoException('invalid box'); // @codeCoverageIgnore |
38 | 38 | } |
39 | 39 |
@@ -12,21 +12,21 @@ |
||
12 | 12 | |
13 | 13 | namespace chillerlan\Traits\Crypto; |
14 | 14 | |
15 | -trait MemzeroDestructorTrait{ |
|
15 | +trait MemzeroDestructorTrait { |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @return void |
19 | 19 | */ |
20 | - public function __destruct(){ |
|
20 | + public function __destruct() { |
|
21 | 21 | |
22 | - if(!function_exists('sodium_memzero')){ |
|
22 | + if (!function_exists('sodium_memzero')) { |
|
23 | 23 | return; |
24 | 24 | } |
25 | 25 | |
26 | - foreach(array_keys(get_object_vars($this)) as $key){ |
|
26 | + foreach (array_keys(get_object_vars($this)) as $key) { |
|
27 | 27 | |
28 | - if(is_scalar($this->{$key})){ |
|
29 | - $this->{$key} = (string)$this->{$key}; |
|
28 | + if (is_scalar($this->{$key})) { |
|
29 | + $this->{$key} = (string) $this->{$key}; |
|
30 | 30 | |
31 | 31 | sodium_memzero($this->{$key}); |
32 | 32 | } |