Completed
Push — master ( 081071...48c049 )
by Enrico
01:58
created

InvalidRawDataWarning::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 4
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 4
crap 2
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) {
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