FactsValidatorWarning   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 15
ccs 0
cts 5
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getFacts() 0 2 1
1
<?php
2
namespace BOTK\Exception;
3
4
class FactsValidatorWarning extends Warning
5
{
6
	protected  $data;
7
	
8
	// Redefine the exception adding an extra paramether
9
    public function __construct($message, \BOTK\ModelInterface $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 getFacts() {
18
        return $this->data;
19
    }
20
}
21