Skill   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 2
1
<?php
2
/**
3
 * Skill
4
 *
5
 * @package LivePersonInc\LiveEngageLaravel\Models
6
 */
7
8
namespace LivePersonInc\LiveEngageLaravel\Models;
9
10
use Illuminate\Database\Eloquent\Model;
11
use LivePersonInc\LiveEngageLaravel\Facades\LiveEngageLaravel as LiveEngage;
12
13
class Skill extends Model
14
{
15
	protected $guarded = [];
16
	
17 1
	public function __construct($skill)
18
	{
19 1
		if (is_int($skill)) {
20 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

20
			/** @scrutinizer ignore-call */ 
21
   $skill = LiveEngage::getSkill($skill);
Loading history...
21
		}
22 1
		parent::__construct((array) $skill);
23 1
	}
24
}
25