Completed
Push — master ( 315749...e0be30 )
by Алексей
03:54
created

ArrayOfBaseType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 24
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
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
}