Completed
Pull Request — devel (#146)
by Litera
24:35 queued 19:02
created

AuthService   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 2

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getLoginUrl() 0 4 1
A setInit() 0 5 1
A getLogoutUrl() 0 4 1
1
<?php
2
3
namespace App\Services\Skautis;
4
5
/**
6
 * Authentication service
7
 */
8
class AuthService extends SkautisService
9
{
10
11
	/**
12
	 * Gets login url
13
	 *
14
	 * @param   string  $backlink
15
	 * @return  string
16
	 */
17
	public function getLoginUrl($backlink)
18
	{
19
		return $this->getSkautis()->getLoginUrl($backlink);
20
	}
21
22
23
	/**
24
	 * Sets initial data after login to Skautis
25
	 *
26
	 * @param   array  $arr
27
	 * @return  void
28
	 */
29
	public function setInit(array $arr)
30
	{
31
		//$this->skautis->setLoginData($arr['skautIS_Token'], $arr['skautIS_IDRole'], $arr['skautIS_IDUnit']);
32
		$this->getSkautis()->setLoginData($arr);
33
	}
34
35
36
	/**
37
	 * Return url for log out
38
	 *
39
	 * @param   void
40
	 * @return  string
41
	 */
42
	public function getLogoutUrl()
43
	{
44
		return $this->getSkautis()->getLogoutUrl();
45
	}
46
47
}
48