Passed
Push — master ( 8c1a6c...28368a )
by Yunus Emre
03:25
created

BaseMeta::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 7
rs 10
ccs 6
cts 6
cp 1
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace TarfinLabs\Parasut\Repositories\Meta;
4
5
abstract class BaseMeta
6
{
7
    public ?int    $currentPage;
8
    public ?int    $totalPages;
9
    public ?int    $totalCount;
10
    public ?int    $perPage;
11
    public ?string $exportUrl;
12
13 1
    public function __construct(array $meta)
14
    {
15 1
        $this->currentPage = $meta['current_page'] ?? null;
16 1
        $this->totalPages = $meta['total_pages'] ?? null;
17 1
        $this->totalCount = $meta['total_count'] ?? null;
18 1
        $this->perPage = $meta['per_page'] ?? null;
19 1
        $this->exportUrl = $meta['export_url'] ?? null;
20 1
    }
21
}
22