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

Skill   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 10
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 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