ArrayDataSource   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 25
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 15 1
1
<?php
2
/**
3
 * This file is part of the Cubiche package.
4
 *
5
 * Copyright (c) Cubiche
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace Cubiche\Core\Collections\DataSource;
11
12
use Cubiche\Core\Comparable\ComparatorInterface;
13
use Cubiche\Core\Specification\SpecificationInterface;
14
15
/**
16
 * Array Data Source Class.
17
 *
18
 * @author Karel Osorio Ramírez <[email protected]>
19
 */
20
class ArrayDataSource extends IteratorDataSource
21
{
22
    /**
23
     * @param array                  $items
24
     * @param SpecificationInterface $searchCriteria
25
     * @param ComparatorInterface    $sortCriteria
26
     * @param int                    $offset
27
     * @param int                    $length
28
     */
29
    public function __construct(
30
        array $items,
31
        SpecificationInterface $searchCriteria = null,
32
        ComparatorInterface $sortCriteria = null,
33
        $offset = null,
34
        $length = null
35
    ) {
36
        parent::__construct(
37
            new \ArrayIterator($items),
38
            $searchCriteria,
39
            $sortCriteria,
40
            $offset,
41
            $length
42
        );
43
    }
44
}
45