OpauthValidationException::setData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 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