Passed
Push — master ( dfeadf...0d8182 )
by Jean-Christophe
04:51
created

AuthFiles   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Test Coverage

Coverage 29.4%

Importance

Changes 0
Metric Value
wmc 8
eloc 10
dl 0
loc 63
ccs 5
cts 17
cp 0.294
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getViewInfo() 0 2 1
A getViewBaseTemplate() 0 2 1
A getViewIndex() 0 2 1
A getViewDisconnected() 0 2 1
A getViewMessage() 0 2 1
A getViewNoAccess() 0 2 1
A getBaseTemplate() 0 2 1
A __construct() 0 2 1
1
<?php
2
3
namespace Ubiquity\controllers\Auth;
4
5
class AuthFiles {
6
	protected $viewBase;
7
	
8 1
	public function __construct(){
9 1
		$this->viewBase="@framework/auth";
10 1
	}
11
	
12
	/**
13
	 * To override
14
	 * The login view
15
	 * @return string
16
	 */
17
	public function getViewIndex() {
18
		return $this->viewBase."/index.html";
19
	}
20
	
21
	/**
22
	 * To override
23
	 * The info view, displays the connected user and a logout button
24
	 * @return string
25
	 */
26
	public function getViewInfo() {
27
		return $this->viewBase."/info.html";
28
	}
29
	
30
	/**
31
	 * To override
32
	 * @return string
33
	 */
34
	public function getViewNoAccess() {
35
		return $this->viewBase."/noAccess.html";
36
	}
37
	
38
	/**
39
	 * Returns the base template for all Auth actions if getBaseTemplate return a base template filename
40
	 * @return string
41
	 */
42
	public function getViewBaseTemplate() {
43
		return $this->viewBase."/baseTemplate.html";
44
	}
45
	
46
	/**
47
	 * To override
48
	 * @return string
49
	 */
50
	public function getViewDisconnected() {
51
		return $this->viewBase."/disconnected.html";
52
	}
53
	
54
	/**
55
	 * 
56
	 * @return string
57
	 */
58
	public function getViewMessage() {
59
		return $this->viewBase."/message.html";
60
	}
61
	
62
	/**
63
	 * To override
64
	 * Returns the base template filename, default : null
65
	 */
66 1
	public function getBaseTemplate(){
67 1
		return;
68
	}
69
}
70
71