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   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 2
Metric Value
wmc 2
c 2
b 0
f 2
lcom 0
cbo 1
dl 0
loc 29
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __invoke() 0 4 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