ErrorReturned::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
cc 2
eloc 3
nc 2
nop 1
crap 2
1
<?php
2
3
namespace MathieuTu\PDFLayer\Exceptions;
4
5
class ErrorReturned
6
{
7
    public $code;
8
    public $type;
9
    public $info;
10
11 1
    public function __construct($error)
12
    {
13 1
        foreach ($error->error as $key => $value) {
14 1
            $this->{$key} = $value;
15
        }
16 1
    }
17
}
18