Completed
Push — master ( 6ea9b4...222850 )
by Andreas
04:32
created

TypeInfo   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 29
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getMimeType() 0 4 1
1
<?php
2
/**
3
 * Type information part.
4
 *
5
 * @copyright 2018 Institute of Legal Medicine, Medical University of Innsbruck
6
 * @author Andreas Erhard <[email protected]>
7
 * @license LGPL-3.0-only
8
 * @link http://www.gerichtsmedizin.at/
9
 *
10
 * @package fileinfo
11
 */
12
namespace Gmi\Toolkit\Fileinfo\Part;
13
14
/**
15
 * Represents the file type information part of a FileInfo.
16
 */
17
class TypeInfo implements InfoPartInterface
18
{
19
    /**
20
     * @var string
21
     */
22
    private $mimeType;
23
24
    /**
25
     * Constructor.
26
     *
27
     * @internal
28
     *
29
     * @param string $mimeType
30
     */
31 5
    public function __construct($mimeType)
32
    {
33 5
        $this->mimeType = $mimeType;
34 5
    }
35
36
    /**
37
     * Returns the MIME type of a file.
38
     *
39
     * @return string
40
     */
41 4
    public function getMimeType()
42
    {
43 4
        return $this->mimeType;
44
    }
45
}
46