Completed
Push — master ( 35eb86...2de709 )
by Thomas
47s
created

AccountCheckException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getRedirectResponse() 0 3 1
1
<?php
2
/**
3
 * @author Jörn Friedrich Dreyer <[email protected]>
4
 *
5
 * @copyright Copyright (c) 2018, ownCloud GmbH
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 OC\Authentication\Exceptions;
23
24
use Exception;
25
use OCP\AppFramework\Http\RedirectResponse;
26
27
class AccountCheckException extends Exception {
28
29
	/**
30
	 * @var RedirectResponse
31
	 */
32
	private $redirectResponse;
33
34
	/**
35
	 * AccountCheckException constructor.
36
	 *
37
	 * @param RedirectResponse $redirectResponse
38
	 * @param string $message
39
	 * @param int $code
40
	 * @param \Throwable|null $previous
41
	 */
42
	public function __construct(RedirectResponse $redirectResponse, $message = '', $code = 0, \Throwable $previous = null) {
43
		parent::__construct($message, $code, $previous);
44
		$this->redirectResponse = $redirectResponse;
45
	}
46
47
	/**
48
	 * @return RedirectResponse
49
	 */
50
	public function getRedirectResponse() {
51
		return $this->redirectResponse;
52
	}
53
}
54