BaseControl   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 22.22%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 44
ccs 2
cts 9
cp 0.2222
rs 10
c 1
b 0
f 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getMeetingId() 0 4 1
A setMeetingId() 0 6 1
A buildTemplatePath() 0 9 1
1
<?php
2
3
namespace App\Components;
4
5
use Nette\Application\UI\Control;
6
7 1
abstract class BaseControl extends Control
8
{
9
10
	const TEMPLATE_DIR = __DIR__ . '/../templates/components';
11
	const TEMPLATE_EXT = 'latte';
12
13
	/**
14
	 * @var integer
15
	 */
16
	protected $meetingId = null;
17
18
	/**
19
	 * @return integer
20
	 */
21
	public function getMeetingId()
22
	{
23 1
		return $this->meetingId;
24
	}
25
26
	/**
27
	 * @param  integer $id
28
	 * @return $this
29
	 */
30
	public function setMeetingId($id = null)
31
	{
32
		$this->meetingId = $id;
33
34
		return $this;
35
	}
36
37
	/**
38
	 * @return string
39
	 */
40
	protected function buildTemplatePath()
41
	{
42
		return sprintf(
43
			'%s/%s.%s',
44
			static::TEMPLATE_DIR,
45
			static::TEMPLATE_NAME,
46
			self::TEMPLATE_EXT
47
		);
48
	}
49
50
}
51