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 ( d8e85b...9135f5 )
by Tomasz
02:28
created

SerializerHandler::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
namespace Thunder\Shortcode\Handler;
3
4
use Thunder\Shortcode\Serializer\SerializerInterface;
5
use Thunder\Shortcode\Shortcode\ShortcodeInterface;
6
7
/**
8
 * @author Tomasz Kowalczyk <[email protected]>
9
 */
10
final class SerializerHandler
11
{
12
    /** @var SerializerInterface */
13
    private $serializer;
14
15 17
    function __construct(SerializerInterface $serializer)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
16
    {
17 17
        $this->serializer = $serializer;
18 17
    }
19
20
    /**
21
     * [text arg=val /]
22
     * [text arg=val]content[/text]
23
     * [json arg=val /]
24
     * [json arg=val]content[/json]
25
     * [xml arg=val /]
26
     * [xml arg=val]content[/xml]
27
     * [yaml arg=val /]
28
     * [yaml arg=val]content[/yaml]
29
     *
30
     * @param ShortcodeInterface $shortcode
31
     *
32
     * @return string
33
     */
34 2
    public function __invoke(ShortcodeInterface $shortcode)
35
    {
36 2
        return $this->serializer->serialize($shortcode);
37
    }
38
}
39