ListItems   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 43
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getTotalResults() 0 3 1
A getPage() 0 3 1
A getTotalPages() 0 3 1
1
<?php declare(strict_types=1);
2
/**
3
 * This file is part of the Tmdb package.
4
 *
5
 * (c) Vincent Faliès <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @author Vincent Faliès <[email protected]>
11
 * @copyright Copyright (c) 2017
12
 */
13
14
namespace VfacTmdb\Traits;
15
16
/**
17
 * listItems trait
18
 * @package Tmdb
19
 * @author Vincent Faliès <[email protected]>
20
 * @copyright Copyright (c) 2017
21
 */
22
trait ListItems
23
{
24
    /**
25
     * Page number
26
     * @var int
27
     */
28
    public $page = 1;
29
    /**
30
     * Total pages
31
     * @var int
32
     */
33
    public $total_pages = 1;
34
    /**
35
     * Total results
36
     * @var int
37
     */
38
    public $total_results = 0;
39
40
    /**
41
     * Get page from result search
42
     * @return int
43
     */
44 6
    public function getPage() : int
45
    {
46 6
        return $this->page;
47
    }
48
49
    /**
50
     * Get total page from result search
51
     * @return int
52
     */
53 6
    public function getTotalPages() : int
54
    {
55 6
        return $this->total_pages;
56
    }
57
58
    /**
59
     * Get total results from search
60
     * @return int
61
     */
62 6
    public function getTotalResults() : int
63
    {
64 6
        return $this->total_results;
65
    }
66
}
67