Passed
Branch version-2.0 (b3c55d)
by Sebastian
01:53
created

ArrayList::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/*
3
 * Copyright (C) 2016 Sebastian Böttger <[email protected]>
4
 * You may use, distribute and modify this code under the
5
 * terms of the MIT license.
6
 *
7
 * You should have received a copy of the MIT license with
8
 * this file. If not, please visit: https://opensource.org/licenses/mit-license.php
9
 */
10
11
namespace Seboettg\Collection;
12
13
use Seboettg\Collection\ArrayList\ArrayListInterface;
14
use Seboettg\Collection\ArrayList\ArrayListTrait;
15
16
/**
17
 * ArrayList is a useful wrapper class for an array, similar to Java's ArrayList
18
 * @package Seboettg\Collection
19
 *
20
 * @author Sebastian Böttger <[email protected]>
21
 */
22
class ArrayList implements ArrayListInterface
23
{
24
25
    use ArrayListTrait;
26
27
    /**
28
     * ArrayList constructor.
29
     * @param array $data
30
     */
31 26
    public function __construct(array $data = [])
32
    {
33 26
        $this->array = $data;
34 26
    }
35
}
36