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

Result   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 38
ccs 8
cts 8
cp 1
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

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