Passed
Branch version-1.x (4225f6)
by Sebastian
02:41 queued 58s
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
/*
4
 * Copyright (C) 2016 Sebastian Böttger <[email protected]>
5
 * You may use, distribute and modify this code under the
6
 * terms of the MIT license.
7
 *
8
 * You should have received a copy of the MIT license with
9
 * this file. If not, please visit: https://opensource.org/licenses/mit-license.php
10
 */
11
12
namespace Seboettg\Collection;
13
14
/**
15
 * ArrayList is a useful wrapper class for an array, similar to Java's ArrayList
16
 * @package Seboettg\Collection
17
 *
18
 * @author Sebastian Böttger <[email protected]>
19
 */
20
class ArrayList implements Collection
21
{
22
    use ArrayListTrait;
23
24
    /**
25
     * ArrayList constructor.
26
     * @param array $data
27
     */
28 25
    public function __construct(array $data = [])
29
    {
30 25
        $this->array = $data;
31 25
    }
32
}
33