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.

SerializerHandler   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

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 19
    public function __construct(SerializerInterface $serializer)
16
    {
17 19
        $this->serializer = $serializer;
18 19
    }
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