BaseMeta   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 11
c 1
b 0
f 0
dl 0
loc 15
rs 10
ccs 6
cts 6
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 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 2
    public function __construct(array $meta)
14
    {
15 2
        $this->currentPage = $meta['current_page'] ?? null;
16 2
        $this->totalPages = $meta['total_pages'] ?? null;
17 2
        $this->totalCount = $meta['total_count'] ?? null;
18 2
        $this->perPage = $meta['per_page'] ?? null;
19 2
        $this->exportUrl = $meta['export_url'] ?? null;
20 2
    }
21
}
22