AccountStatus::__construct()   A
last analyzed

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