Completed
Push — master ( d8ae00...12ed8a )
by Tobias
02:18
created

PaginationResponse   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 27
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getNextUrl() 0 4 1
A getPreviousUrl() 0 4 1
A getFirstUrl() 0 4 1
A getLastUrl() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * Copyright (C) 2013 Mailgun
7
 *
8
 * This software may be modified and distributed under the terms
9
 * of the MIT license. See the LICENSE file for details.
10
 */
11
12
namespace Mailgun\Model;
13
14
/**
15
 * @author Tobias Nyholm <[email protected]>
16
 */
17
trait PaginationResponse
18
{
19
    /**
20
     * @var array
21
     */
22
    private $paging;
23
24 1
    public function getNextUrl(): ?string
25
    {
26 1
        return $this->paging['next'] ?? null;
27
    }
28
29 1
    public function getPreviousUrl(): ?string
30
    {
31 1
        return $this->paging['previous'] ?? null;
32
    }
33
34 1
    public function getFirstUrl(): ?string
35
    {
36 1
        return $this->paging['first'] ?? null;
37
    }
38
39 2
    public function getLastUrl(): ?string
40
    {
41 2
        return $this->paging['last'] ?? null;
42
    }
43
}
44