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

Meta   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 11
c 1
b 0
f 0
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 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