Completed
Push — master ( fd9633...5f3c46 )
by Robin
117:54
created

DummyUserSession::getUser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * @author Robin Appelman <[email protected]>
4
 *
5
 * @copyright Copyright (c) 2015, ownCloud, Inc.
6
 * @license AGPL-3.0
7
 *
8
 * This code is free software: you can redistribute it and/or modify
9
 * it under the terms of the GNU Affero General Public License, version 3,
10
 * as published by the Free Software Foundation.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
 * GNU Affero General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Affero General Public License, version 3,
18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
19
 *
20
 */
21
22
namespace OCA\Files_external\Migration;
23
24
use OCP\IUser;
25
use OCP\IUserSession;
26
27
class DummyUserSession implements IUserSession {
28
29
	/**
30
	 * @var IUser
31
	 */
32
	private $user;
33
34
	public function login($user, $password) {
35
	}
36
37
	public function logout() {
38
	}
39
40
	public function setUser($user) {
41
		$this->user = $user;
42
	}
43
44
	public function getUser() {
45
		return $this->user;
46
	}
47
48
	public function isLoggedIn() {
49
		return !is_null($this->user);
50
	}
51
}
52