SearchResponse   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 39
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
/**
3
 * MOJEPANSTWO-API
4
 *
5
 * Copyright © 2017 pudelek.org.pl
6
 *
7
 * @license MIT License (MIT)
8
 *
9
 * For the full copyright and license information, please view source file
10
 * that is bundled with this package in the file LICENSE
11
 *
12
 * @author  Marcin Pudełek <[email protected]>
13
 */
14
15
16
declare (strict_types=1);
17
18
namespace mrcnpdlk\MojePanstwo\Model;
19
20
/**
21
 * Class SearchResponse
22
 *
23
 * @package mrcnpdlk\MojePanstwo\Model
24
 */
25
class SearchResponse
26
{
27
    /**
28
     * Liczba wszystkich obiektów pasujących do zapytania, kolejne strony można zwracać zmieniając parametr page
29
     *
30
     * @var integer
31
     */
32
    public $count;
33
    /**
34
     * Długość trwania zapytania w milisekundach
35
     *
36
     * @var integer
37
     */
38
    public $took;
39
    /**
40
     * @var \mrcnpdlk\MojePanstwo\Model\SearchResponseLinks
41
     */
42
    public $links;
43
    /**
44
     * @var \mrcnpdlk\MojePanstwo\Model\SearchResponseItem[]
45
     */
46
    public $items;
47
48
    /**
49
     * SearchResponse constructor.
50
     *
51
     * @param                                                  $count
52
     * @param                                                  $took
53
     * @param \mrcnpdlk\MojePanstwo\Model\SearchResponseLinks  $links
54
     * @param \mrcnpdlk\MojePanstwo\Model\SearchResponseItem[] $items
55
     */
56 6
    public function __construct($count, $took, SearchResponseLinks $links, array $items = [])
57
    {
58 6
        $this->count = (int)$count;
59 6
        $this->took  = (int)$took;
60 6
        $this->links = $links;
61 6
        $this->items = $items;
62 6
    }
63
}
64