Test Failed
Push — develop ( 9dccb9...240a5e )
by Nuno
03:56
created

Encrypter::local()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 6
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * This file is part of Scout Extended.
7
 *
8
 * (c) Algolia Team <[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 Algolia\ScoutExtended\Settings;
15
16
/**
17
 * @internal
18
 */
19
final class Encrypter
20
{
21
    /**
22
     * @param  \Algolia\ScoutExtended\Settings\Settings $settings
23
     *
24
     * @return string
25
     */
26
    public function encrypt(Settings $settings): string
27
    {
28
        return md5(serialize($settings->compiled()));
29
    }
30
}
31