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

DataItem   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 28
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getMethod() 0 3 1
A getData() 0 3 1
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