NoopFilenameSanitizer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 20
ccs 4
cts 4
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A beautify() 0 3 1
A sanitize() 0 3 1
1
<?php
2
3
/**
4
 * Copyright (c) Florian Krämer (https://florian-kraemer.net)
5
 * Licensed under The MIT License
6
 * For full copyright and license information, please see the LICENSE.txt
7
 * Redistributions of files must retain the above copyright notice.
8
 *
9
 * @copyright Copyright (c) Florian Krämer (https://florian-kraemer.net)
10
 * @author    Florian Krämer
11
 * @link      https://github.com/Phauthentic
12
 * @license   https://opensource.org/licenses/MIT MIT License
13
 */
14
15
declare(strict_types=1);
16
17
namespace Phauthentic\Infrastructure\Storage\Utility;
18
19
/**
20
 * Noop Filename Sanitizer
21
 *
22
 * @link https://en.wikipedia.org/wiki/NOP_(code)
23
 */
24
class NoopFilenameSanitizer implements FilenameSanitizerInterface
25
{
26
    /**
27
     * @param string $string String
28
     * @return string
29
     */
30 1
    public function sanitize(string $string): string
31
    {
32 1
        return $string;
33
    }
34
35
    /**
36
     * Beautifies a filename to make it better to read
37
     *
38
     * @param string $filename Filename
39
     * @return string
40
     */
41 1
    public function beautify(string $filename): string
42
    {
43 1
        return $filename;
44
    }
45
}
46