ArrayOfBaseType::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 7
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: akeinhell
5
 * Date: 06.11.2016
6
 * Time: 1:39
7
 */
8
9
namespace Telegram\Base;
10
11
12
use Illuminate\Support\Collection;
13
14
class ArrayOfBaseType
15
{
16
    protected $baseType;
17
    /**
18
     * @var Collection
19
     */
20
    private $array;
21
22
    /**
23
     * ArrayOfBaseType constructor.
24
     *
25
     * @param array $array
26
     */
27
    public function __construct(array $array)
28
    {
29
        $baseType    = $this->baseType;
30
        $this->array = collect($array)
31
            ->map(function ($item) use ($baseType) {
32
                return new BaseType($item);
33
            });
34
    }
35
36
37
}