Completed
Push — master ( cf5944...0d6816 )
by Alexander
05:51 queued 02:56
created

GuestStrategy::errorHandle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Guest authentication strategy
4
 *
5
 * @file      GuestStrategy,php
6
 *
7
 * PHP version 7.0+
8
 *
9
 * @author    Alexander Yancharuk <alex at itvault dot info>
10
 * @copyright © 2012-2018 Alexander Yancharuk
11
 * @date      Вск Янв 27 21:43:51 2013
12
 * @license   The BSD 3-Clause License
13
 *            <https://tldrlegal.com/license/bsd-3-clause-license-(revised)>.
14
 */
15
16
namespace Veles\Auth\Strategies;
17
18
use Veles\Auth\UsrGroup;
19
20
/**
21
 * Class GuestStrategy
22
 *
23
 * @author  Alexander Yancharuk <alex at itvault dot info>
24
 */
25
class GuestStrategy extends AbstractAuthStrategy
26
{
27
	/**
28
	 * Guest authentication
29
	 *
30
	 * @return bool
31
	 */
32 2
	public function identify()
33
	{
34 2
		$props = ['group' => UsrGroup::GUEST];
35 2
		$this->user->setProperties($props);
36
37 2
		return false;
38
	}
39
40
	/**
41
	 * Stub
42
	 *
43
	 * @param array $input
44
	 *
45
	 * @return void
46
	 */
47 2
	public function errorHandle(array $input)
48
	{
49 2
		unset($input);
50 2
	}
51
}
52