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.
Completed
Push — master ( 1978d2...e2f699 )
by William
03:55
created

Hateoas/Representation/VndErrorRepresentation.php (2 issues)

Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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
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...
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