UnsupportedObjectException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 23
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getUnsupportedObject() 0 3 1
1
<?php
2
3
namespace Serializers\Exceptions;
4
5
use Exception;
6
7
/**
8
 * @since 1.0
9
 *
10
 * @license GPL-2.0-or-later
11
 * @author Jeroen De Dauw < [email protected] >
12
 */
13
class UnsupportedObjectException extends SerializationException {
14
15
	private $unsupportedObject;
16
17
	/**
18
	 * @param mixed $unsupportedObject
19
	 * @param string $message
20
	 * @param Exception|null $previous
21
	 */
22 2
	public function __construct( $unsupportedObject, $message = '', Exception $previous = null ) {
23 2
		$this->unsupportedObject = $unsupportedObject;
24
25 2
		parent::__construct( $message, $previous );
26 2
	}
27
28
	/**
29
	 * @return mixed
30
	 */
31 2
	public function getUnsupportedObject() {
32 2
		return $this->unsupportedObject;
33
	}
34
35
}
36