GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

PaginatedRepresentation   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 51
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace Halapi\Representation;
4
5
/**
6
 * A paginated collection representation.
7
 *
8
 * Class PaginatedRepresentation
9
 */
10
class PaginatedRepresentation
11
{
12
    /**
13
     * Filters const used to provide easy documentation integration.
14
     */
15
    const FILTERS = [
16
        ['name' => 'page', 'dataType' => 'integer', 'default' => 1],
17
        ['name' => 'limit', 'dataType' => 'integer', 'default' => 20],
18
        // We'll need some more work to re-implement that as OpenApi has currently no support for
19
        // query params of this kind. ( ?param[key]=value )
20
        //['name' => 'sorting', 'dataType' => 'array'],
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
21
        //['name' => 'filtervalue', 'dataType' => 'array', 'pattern' => '[field]=(asc|desc)'],
0 ignored issues
show
Unused Code Comprehensibility introduced by
64% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
22
        //['name' => 'filteroperator', 'dataType' => 'array', 'pattern' => '[field]=(<|>|<=|>=|=|!=)'],
0 ignored issues
show
Unused Code Comprehensibility introduced by
64% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
23
    ];
24
25
    /**
26
     * @var int
27
     */
28
    public $page;
29
30
    /**
31
     * @var int
32
     */
33
    public $limit;
34
35
    /**
36
     * @var array
37
     */
38
    public $_links;
39
40
    /**
41
     * @var array
42
     */
43
    public $_embedded;
44
45
    /**
46
     * PaginatedRepresentation constructor.
47
     *
48
     * @param int   $page
49
     * @param int   $limit
50
     * @param array $links
51
     * @param array $embedded
52
     */
53
    public function __construct($page, $limit, $links, $embedded)
54
    {
55
        $this->page = $page;
56
        $this->limit = $limit;
57
        $this->_links = $links;
58
        $this->_embedded = $embedded;
59
    }
60
}
61