Test Failed
Branch development (f482bc)
by Robert
06:44
created

Skills   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A toSkillIds() 0 6 1
A __construct() 0 8 1
1
<?php
2
3
namespace LivePersonInc\LiveEngageLaravel\Collections;
4
5
use Illuminate\Support\Collection;
6
use LivePersonInc\LiveEngageLaravel\Models\Skill;
7
8
class Skills extends Collection
9
{
10
	public function __construct(array $models = [])
11
	{
12
		
13
		$models = array_map(function($item) {
14
			return new Skill((array) $item);
15
		}, $models);
16
		
17
		parent::__construct($models);
18
	}
19
	
20
	public function toSkillIds()
21
	{
22
		$array = array_map(function($item) {
23
			return $item['id'];
24
		}, $this->toArray());
25
		return $array;
26
	}
27
}