Passed
Push — master ( 2bfb13...b8de7b )
by De Cramer
02:14
created

DataItem::__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
namespace Oliverde8\Component\PhpEtl\Item;
4
5
/**
6
 * Class DataItem
7
 *
8
 * @author    de Cramer Oliver<[email protected]>
9
 * @copyright 2018 Oliverde8
10
 * @package Oliverde8\Component\PhpEtl\Item
11
 */
12
class DataItem implements DataItemInterface
13
{
14
    /**
15
     * @var mixed
16
     */
17
    protected $data;
18
19
    /**
20
     * DataItem constructor.
21
     *
22
     * @param mixed $data
23
     */
24 7
    public function __construct($data)
25
    {
26 7
        $this->data = $data;
27 7
    }
28
29
    /**
30
     * @inheritdoc
31
     */
32 7
    public function getMethod(): string
33
    {
34 7
        return 'data';
35
    }
36
37 5
    public function getData()
38
    {
39 5
       return $this->data;
40
    }
41
}
42