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

PaginationResponse::getPreviousUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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