Passed
Push — master ( 35232d...8d0b59 )
by Melech
06:16 queued 02:04
created

NullCrypt::decrypt()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Valkyrja Framework package.
7
 *
8
 * (c) Melech Mizrachi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Valkyrja\Crypt;
15
16
use stdClass;
17
use Valkyrja\Crypt\Contract\Crypt;
18
19
/**
20
 * Class NullCrypt.
21
 *
22
 * @author Melech Mizrachi
23
 */
24
class NullCrypt implements Crypt
25
{
26
    /**
27
     * @inheritDoc
28
     */
29
    public function isValidEncryptedMessage(string $encrypted): bool
30
    {
31
        return true;
32
    }
33
34
    /**
35
     * @inheritDoc
36
     */
37
    public function encrypt(string $message, string|null $key = null): string
38
    {
39
        return '';
40
    }
41
42
    /**
43
     * @inheritDoc
44
     */
45
    public function encryptArray(array $array, string|null $key = null): string
46
    {
47
        return '';
48
    }
49
50
    /**
51
     * @inheritDoc
52
     */
53
    public function encryptObject(object $object, string|null $key = null): string
54
    {
55
        return '';
56
    }
57
58
    /**
59
     * @inheritDoc
60
     */
61
    public function decrypt(string $encrypted, string|null $key = null): string
62
    {
63
        return '';
64
    }
65
66
    /**
67
     * @inheritDoc
68
     */
69
    public function decryptArray(string $encrypted, string|null $key = null): array
70
    {
71
        return [];
72
    }
73
74
    /**
75
     * @inheritDoc
76
     */
77
    public function decryptObject(string $encrypted, string|null $key = null): object
78
    {
79
        return new stdClass();
80
    }
81
}
82