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.

VndErrorRepresentation   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 60
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getRelations() 0 14 3
A getMessage() 0 4 1
A getLogref() 0 4 1
1
<?php
2
3
namespace Hateoas\Representation;
4
5
use Hateoas\Configuration\Relation;
6
use Hateoas\Configuration\Annotation as Hateoas;
7
use Hateoas\Configuration\Metadata\ClassMetadataInterface;
8
use JMS\Serializer\Annotation as Serializer;
9
10
/**
11
 * @Serializer\ExclusionPolicy("all")
12
 * @Serializer\XmlRoot("resource")
13
 *
14
 * @Hateoas\RelationProvider("getRelations")
15
 *
16
 * @author William Durand <[email protected]>
17
 */
18
class VndErrorRepresentation
19
{
20
    /**
21
     * @Serializer\Expose
22
     */
23
    private $message;
24
25
    /**
26
     * @Serializer\Expose
27
     * @Serializer\XmlAttribute
28
     */
29
    private $logref;
30
31
    /**
32
     * @var Relation
33
     */
34
    private $help;
35
36
    /**
37
     * @var Relation
38
     */
39
    private $describes;
40
41
    /**
42
     * @param string $message
43
     * @param integer $logref
44
     */
45
    public function __construct($message, $logref = null, Relation $help = null, Relation $describes = null)
46
    {
47
        $this->message   = $message;
48
        $this->logref    = $logref;
49
        $this->help      = $help;
50
        $this->describes = $describes;
51
    }
52
53
    public function getRelations($object, ClassMetadataInterface $classMetadata)
0 ignored issues
show
Unused Code introduced by
The parameter $object is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $classMetadata is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
54
    {
55
        $relations = array();
56
57
        if (null !== $this->help) {
58
            $relations[] = $this->help;
59
        }
60
61
        if (null !== $this->describes) {
62
            $relations[] = $this->describes;
63
        }
64
65
        return $relations;
66
    }
67
68
    public function getMessage()
69
    {
70
        return $this->message;
71
    }
72
73
    public function getLogref()
74
    {
75
        return $this->logref;
76
    }
77
}
78