FileAnalysisResult   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 55
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getMimeType() 0 3 1
A getSize() 0 3 1
A getPath() 0 3 1
A getFileName() 0 3 1
1
<?php
2
/**
3
 * @author Threema GmbH
4
 * @copyright Copyright (c) 2015-2016 Threema GmbH
5
 */
6
7
8
namespace Threema\MsgApi\Tools;
9
10
class FileAnalysisResult {
11
	/**
12
	 * @var string
13
	 */
14
	private $mimeType;
15
16
	/**
17
	 * @var int
18
	 */
19
	private $size;
20
21
	/**
22
	 * @var string
23
	 */
24
	private $path;
25
26
	/**
27
	 * @param string $mimeType
28
	 * @param int $size
29
	 * @param string $path
30
	 */
31
	public function __construct($mimeType, $size, $path) {
32
		$this->mimeType = $mimeType;
33
		$this->size = $size;
34
		$this->path = realpath($path);
35
	}
36
37
	/**
38
	 * @return string
39
	 */
40
	public function getMimeType() {
41
		return $this->mimeType;
42
	}
43
44
	/**
45
	 * @return int
46
	 */
47
	public function getSize() {
48
		return $this->size;
49
	}
50
51
	/**
52
	 * @return string
53
	 */
54
	public function getPath() {
55
		return $this->path;
56
	}
57
58
	/**
59
	 * @return string
60
	 */
61
	public function getFileName() {
62
		return basename($this->path);
63
	}
64
}
65