Passed
Push — master ( 64ec34...0290f6 )
by Robert
06:09
created

Skill::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 6
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
	public function __construct($skill)
13
	{
14
		if (is_int($skill)) {
15
			$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
		parent::__construct((array) $skill);
18
	}
19
}
20