TicketException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
namespace Cassava\Exception;
4
5
/**
6
 * CAS ticket exception.
7
 *
8
 * @version 1.1.0
9
 * @since   1.1.0
10
 */
11
class TicketException extends GeneralException {
12
13
	/**
14
	 * Invalid Ticket Error
15
	 */
16
	const ERROR_INVALID_TICKET = 'INVALID_TICKET';
17
18
	/**
19
	 * Bad Proxy-Granting Ticket Error
20
	 */
21
	const ERROR_BAD_PGT        = 'BAD_PGT';
22
23
	/**
24
	 * Generates a new ticket exception.
25
	 *
26
	 * @param string $message Exception description.
27
	 * @param string $casCode CAS error code (default: "INVALID_TICKET").
28
	 */
29
	public function __construct( $message = '', $casCode = self::ERROR_INVALID_TICKET ) {
30
		parent::__construct( $message, $casCode );
31
	}
32
33
}
34