Passed
Push — master ( 074c96...5e6d2b )
by Robert
04:56
created

Skill::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 2
1
<?php
2
3
namespace LivePersonInc\LiveEngageLaravel\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use LivePersonInc\LiveEngageLaravel\Facades\LiveEngageLaravel as LiveEngage;
7
8
class Skill extends Model
9
{
10
	protected $guarded = [];
11
	
12 1
	public function __construct($skill)
13
	{
14 1
		if (is_int($skill)) {
15 1
			$skill = LiveEngage::getSkill($skill);
0 ignored issues
show
Bug introduced by
The method getSkill() does not exist on LivePersonInc\LiveEngage...cades\LiveEngageLaravel. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

15
			/** @scrutinizer ignore-call */ 
16
   $skill = LiveEngage::getSkill($skill);
Loading history...
16
		}
17 1
		parent::__construct((array) $skill);
18 1
	}
19
}
20