Passed
Push — master ( 2e7c63...9eb36d )
by Artem
01:35
created

Result::__construct()   A

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 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Prozorov\Repositories;
6
7
class Result
8
{
9
    /**
10
     * @var array $meta
11
     */
12
    protected $meta;
13
14
    /**
15
     * @var iterable $data
16
     */
17
    protected $data;
18
19 2
    public function __construct(iterable $data, array $meta = null)
20
    {
21 2
        $this->data = $data;
22 2
        $this->meta = $meta;
23 2
    }
24
25
    /**
26
     * getData.
27
     *
28
     * @access	public
29
     * @return	iterable
30
     */
31 1
    public function getData(): iterable
32
    {
33 1
        return $this->data;
34
    }
35
36
    /**
37
     * getMeta.
38
     *
39
     * @access	public
40
     * @return	array|null
41
     */
42 1
    public function getMeta(): ?array
43
    {
44 1
        return $this->meta;
45
    }
46
}
47