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::setBasePath()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
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
}