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.

Hateoas::serialize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 3
1
<?php
2
3
namespace Hateoas;
4
5
use Hateoas\Helper\LinkHelper;
6
use JMS\Serializer\DeserializationContext;
7
use JMS\Serializer\SerializationContext;
8
use JMS\Serializer\SerializerInterface;
9
10
/**
11
 * @author Adrien Brault <[email protected]>
12
 */
13
class Hateoas implements SerializerInterface
14
{
15
    /**
16
     * @var SerializerInterface
17
     */
18
    private $serializer;
19
20
    /**
21
     * @var LinkHelper
22
     */
23
    private $linkHelper;
24
25
    /**
26
     * @param SerializerInterface $serializer
27
     * @param LinkHelper          $linkHelper
28
     */
29
    public function __construct(SerializerInterface $serializer, LinkHelper $linkHelper)
30
    {
31
        $this->serializer = $serializer;
32
        $this->linkHelper = $linkHelper;
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    public function serialize($data, $format, SerializationContext $context = null)
39
    {
40
        return $this->serializer->serialize($data, $format, $context);
41
    }
42
43
    /**
44
     * {@inheritdoc}
45
     */
46
    public function deserialize($data, $type, $format, DeserializationContext $context = null)
47
    {
48
        return $this->serializer->deserialize($data, $type, $format, $context);
49
    }
50
51
    /**
52
     * @return SerializerInterface
53
     */
54
    public function getSerializer()
55
    {
56
        return $this->serializer;
57
    }
58
59
    /**
60
     * @return LinkHelper
61
     */
62
    public function getLinkHelper()
63
    {
64
        return $this->linkHelper;
65
    }
66
}
67