ProxyResponse   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 1
cbo 1
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A setTicket() 0 4 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