ArrayWriter::getData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/**
4
 * This file is part of plumphp/plum.
5
 *
6
 * (c) Florian Eckerstorfer <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
namespace Plum\Plum\Writer;
12
13
/**
14
 * ArrayWriter.
15
 *
16
 * @author    Florian Eckerstorfer <[email protected]>
17
 * @copyright 2014-2016 Florian Eckerstorfer
18
 */
19
class ArrayWriter implements WriterInterface
20
{
21
    /** @var array */
22
    private $data = [];
23
24
    /**
25
     * @return array
26
     */
27 1
    public function getData()
28
    {
29 1
        return $this->data;
30
    }
31
32
    /**
33
     * Writes the given item to the array.
34
     *
35
     * @param $item
36
     */
37 1
    public function writeItem($item)
38
    {
39 1
        $this->data[] = $item;
40 1
    }
41
42 1
    public function prepare()
43
    {
44 1
    }
45
46 1
    public function finish()
47
    {
48 1
    }
49
}
50