OpauthValidationException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setData() 0 3 1
A getData() 0 3 1
1
<?php
2
3
/**
4
 * OpauthValidationException
5
 * Exception padded with some data so its handler can do its job intelligently.
6
 * @author Will Morgan <@willmorgan>
7
 * @copyright Copyright (c) 2013, Better Brief LLP
8
 */
9
class OpauthValidationException extends Exception {
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
10
11
	protected $data;
12
13
	public function __construct($message, $code, $data = null) {
14
		parent::__construct($message, $code);
15
		$this->setData($data);
16
	}
17
18
	public function setData($data) {
19
		$this->data = $data;
20
	}
21
22
	public function getData() {
23
		return $this->data;
24
	}
25
26
}
27