Completed
Push — master ( c432ac...8e117f )
by Mathijs
04:01
created

InvalidDataException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace mcorten87\rabbitmq_api\exceptions;
4
5
class InvalidDataException extends BaseException
6
{
7
    protected $code = 1;
8
    private $baseMessage = 'Invalid value[%1$s] for class[%2$s]';
9
10
    public function __construct($class, $value)
11
    {
12
        $caller = $this->getCallerInfo();
13
14
        $message = sprintf($this->baseMessage, $caller->getValue(), $caller->getFile());
15
        parent::__construct($message, $this->code);
16
    }
17
18
}
19