Skip to content

Commit 34ae620

Browse files
authored
Preparation 3.0 (#323)
* Preparation 3.0 * Update with ECS and Rector * Bugs fixed
1 parent 8c8197c commit 34ae620

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

Dir.php

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@
22

33
declare(strict_types=1);
44

5-
/*
6-
* The MIT License (MIT)
7-
*
8-
* Copyright (c) 2014-2020 Spomky-Labs
9-
*
10-
* This software may be modified and distributed under the terms
11-
* of the MIT license. See the LICENSE file for details.
12-
*/
13-
145
namespace Jose\Component\Encryption\Algorithm\KeyEncryption;
156

167
use function in_array;
@@ -21,19 +12,16 @@
2112

2213
final class Dir implements DirectEncryption
2314
{
24-
/**
25-
* @throws InvalidArgumentException if the key is invalid
26-
*/
2715
public function getCEK(JWK $key): string
2816
{
29-
if (!in_array($key->get('kty'), $this->allowedKeyTypes(), true)) {
17+
if (! in_array($key->get('kty'), $this->allowedKeyTypes(), true)) {
3018
throw new InvalidArgumentException('Wrong key type.');
3119
}
32-
if (!$key->has('k')) {
20+
if (! $key->has('k')) {
3321
throw new InvalidArgumentException('The key parameter "k" is missing.');
3422
}
3523
$k = $key->get('k');
36-
if (!is_string($k)) {
24+
if (! is_string($k)) {
3725
throw new InvalidArgumentException('The key parameter "k" is invalid.');
3826
}
3927

0 commit comments

Comments
 (0)