Passed
Push — master ( 00795d...64ec34 )
by Robert
08:15
created

AccountStatus::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
crap 2
1
<?php
2
3
namespace LivePersonInc\LiveEngageLaravel\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class AccountStatus extends Model
8
{
9
	protected $guarded = [];
10
	
11 1
	public function __construct(array $array)
12
	{
13 1
		$output = [];
14 1
		foreach ($array as $key=>$value) {
15 1
			$output[snake_case($key)] = $value;
16
		}
17 1
		parent::__construct($output);
18 1
	}
19
}
20