GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

BaseControl   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 57
ccs 16
cts 16
cp 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getFiles() 0 4 1
A setFiles() 0 4 1
A getBasePath() 0 4 1
A setBasePath() 0 4 1
A formatFileUrl() 0 9 2
1
<?php
2
3
namespace GulpAssets;
4
5
/**
6
 * @author Adam Bisek <[email protected]>
7
 */
8
class BaseControl extends \Nette\Application\UI\Control
9
{
10
11
	/** @var array */
12
	protected $files;
13
14
	/** @var string */
15
	private $basePath;
16
17
18
	/**
19
	 * @return array
20
	 */
21 4
	public function getFiles()
22
	{
23 4
		return $this->files;
24
	}
25
26
27
	/**
28
	 * @param array $files
29
	 */
30 6
	public function setFiles($files)
31
	{
32 6
		$this->files = $files;
33 6
	}
34
35
36
	/**
37
	 * @return string
38
	 */
39 2
	public function getBasePath()
40
	{
41 2
		return $this->basePath;
42
	}
43
44
45
	/**
46
	 * @param string $basePath
47
	 */
48 6
	public function setBasePath($basePath)
49
	{
50 6
		$this->basePath = $basePath;
51 6
	}
52
53
54 2
	protected function formatFileUrl($file)
55
	{
56 2
		$appendix = '';
57 2
		if(is_file($this->basePath . '/' . $file)){
58 2
			$appendix = '?' . md5(filemtime($this->basePath . '/' . $file));
59 2
		}
60
61 2
		return $this->template->baseUrl . '/' . $file . $appendix;
62
	}
63
64
}