Completed
Pull Request — master (#19)
by Şəhriyar
10:40
created

ValidationException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 2
1
<?php namespace App\Exceptions\Common;
2
3
use Illuminate\Validation\Validator;
4
5
class ValidationException extends \UnexpectedValueException
6
{
7
    public function __construct(Validator $validator)
8
    {
9
        if ($validator->fails()) {
10
            parent::__construct(json_encode($validator->errors()->getMessages()));
11
        }
12
    }
13
}
14