Passed
Push — master ( 617c92...5e6e10 )
by Jean-Christophe
05:35
created

ControllerBase   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
eloc 7
dl 0
loc 13
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 3 2
A finalize() 0 3 2
1
<?php
2
3
namespace Ubiquity\controllers;
4
5
use Ubiquity\utils\http\URequest;
6
7
abstract class ControllerBase extends Controller {
8
	protected $headerView="@framework/main/vHeader.html";
9
	protected $footerView="@framework/main/vFooter.html";
10
11 1
	public function initialize() {
12 1
		if (!URequest::isAjax()) {
13 1
			$this->loadView($this->headerView);
14
		}
15 1
	}
16
17 1
	public function finalize() {
18 1
		if (!URequest::isAjax()) {
19 1
			$this->loadView($this->footerView);
20
		}
21 1
	}
22
}
23
24