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

Transfers::toSkillIds()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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