Test Failed
Push — master ( 257d98...3364ef )
by Yunus Emre
06:12
created

Meta::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 7
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace TarfinLabs\Parasut\Repositories;
4
5
class Meta
6
{
7
    public int    $currentPage;
8
    public int    $totalPages;
9
    public int    $totalCount;
10
    public int    $perPage;
11
    public string $exportUrl;
12
13
    // TODO: Look if other models has `payable_total` and `collectible_total` attributes
14
15
    public function __construct(array $meta)
16
    {
17
        $this->currentPage = $meta['current_page'];
18
        $this->totalPages = $meta['total_pages'];
19
        $this->totalCount = $meta['total_count'];
20
        $this->perPage = $meta['per_page'];
21
        $this->exportUrl = $meta['export_url'];
22
    }
23
}
24