Skills::toSkillIds()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * Skills
4
 *
5
 * @package LivePersonInc\LiveEngageLaravel\Collections
6
 */
7
8
namespace LivePersonInc\LiveEngageLaravel\Collections;
9
10
use Illuminate\Support\Collection;
11
use LivePersonInc\LiveEngageLaravel\Models\Skill;
12
13
class Skills extends Collection
14
{
15 1
	public function __construct(array $models = [])
16
	{
17
		
18
		$models = array_map(function($item) {
19 1
			return new Skill((array) $item);
20 1
		}, $models);
21
		
22 1
		parent::__construct($models);
23 1
	}
24
	
25 1
	public function toSkillIds()
26
	{
27
		$array = array_map(function($item) {
28 1
			return $item['id'];
29 1
		}, $this->toArray());
30 1
		return $array;
31
	}
32
}