InvalidRawDataWarning::getData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
namespace BOTK\Exception;
3
4
class InvalidRawDataWarning extends Warning
5
{
6
	protected  $data;
7
	
8
	// Redefine the exception adding an extra paramether
9
    public function __construct($message,  $data, $code = 0, Exception $previous = null) {
0 ignored issues
show
Bug introduced by
The type BOTK\Exception\Exception was not found. Did you mean Exception? If so, make sure to prefix the type with \.
Loading history...
10
        $this->data = $data;
11
    
12
        // make sure everything is assigned properly
13
        parent::__construct($message, $code, $previous);
14
    }
15
16
17
    public function getData() {
18
        return $this->data;
19
    }
20
}
21