Completed
Pull Request — master (#106)
by Litera
08:36
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']);
0 ignored issues
show
Unused Code Comprehensibility introduced by
84% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
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