CollectToArrayOperation::apply()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * File was created 07.05.2015 09:11
4
 *
5
 * @author Karsten J. Gerber <[email protected]>
6
 */
7
8
namespace PeekAndPoke\Component\Psi\Operation\Terminal;
9
10
use PeekAndPoke\Component\Psi\TerminalOperation;
11
12
/**
13
 * CollectToArrayOperation
14
 *
15
 * @author Karsten J. Gerber <[email protected]>
16
 */
17
class CollectToArrayOperation implements TerminalOperation
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22 83
    public function apply(\Iterator $set)
23
    {
24 83
        return array_values(
25 83
            iterator_to_array($set)
26
        );
27
    }
28
}
29