ProxyResponse::setTicket()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
/**
3
 * CAS proxy response class.
4
 *
5
 * @package \WPCASServerPlugin\Server
6
 * @version 1.2.0
7
 * @since 1.2.0
8
 */
9
10
namespace Cassava\CAS\Response;
11
12
use Cassava\CAS;
13
14
/**
15
 * Implements the CAS response for proxy requests.
16
 *
17
 * @version 1.2.0
18
 *
19
 * @todo Throw exception on bad or no ticket.
20
 */
21
class ProxyResponse extends BaseResponse {
22
23
	/**
24
	 * Set XML success response to a CAS 2.0 proxy request.
25
	 *
26
	 * @param \Cassava\CAS\Ticket $proxyTicket Validated proxy ticket.
27
	 */
28
	public function setTicket( CAS\Ticket $proxyTicket ) {
29
		$this->response = $this->createElement( 'proxySuccess' );
30
		$this->response->appendChild( $this->createElement( 'proxyTicket', $proxyTicket ) );
31
	}
32
33
}
34