Passed
Pull Request — master (#9)
by mon
02:04
created

EmptyMap   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 30
rs 10
c 0
b 0
f 0
ccs 3
cts 3
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A reset() 0 4 1
1
<?php
2
3
namespace FileEye\MimeMap\Map;
4
5
/**
6
 * Class for mapping file extensions to MIME types.
7
 *
8
 * This class has no mapping defined. It can be used for feeding updates and
9
 * for testing purposes.
10
 */
11
class EmptyMap extends AbstractMap
12
{
13
    /**
14
     * Singleton instance.
15
     *
16
     * @var AbstractMap
17
     */
18
    protected static $instance;
19
20
    /**
21
     * Mapping between file extensions and MIME types.
22
     *
23
     * Intentionally left blank.
24
     *
25
     * @internal
26
     *
27
     * @var array
28
     */
29
    protected static $map = [];
30
31
    /**
32
     * Resets the map array.
33
     *
34
     * @return array
35
     */
36 2
    public function reset()
37
    {
38 2
        static::$map = [];
39 2
    }
40
}
41