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

WrapHandler   A

Complexity

Total Complexity 3

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 3
c 2
b 0
f 2
lcom 0
cbo 1
dl 0
loc 29
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A createBold() 0 4 1
A __invoke() 0 4 1
1
<?php
2
namespace Thunder\Shortcode\Handler;
3
4
use Thunder\Shortcode\Shortcode\ShortcodeInterface;
5
6
/**
7
 * @author Tomasz Kowalczyk <[email protected]>
8
 */
9
final class WrapHandler
10
{
11
    private $before;
12
    private $after;
13
14 17
    public function __construct($before, $after)
15
    {
16 17
        $this->before = $before;
17 17
        $this->after = $after;
18 17
    }
19
20 17
    public static function createBold()
21
    {
22 17
        return new self('<b>', '</b>');
23
    }
24
25
    /**
26
     * [b]content[b]
27
     * [strong]content[/strong]
28
     *
29
     * @param ShortcodeInterface $shortcode
30
     *
31
     * @return string
32
     */
33 2
    public function __invoke(ShortcodeInterface $shortcode)
34
    {
35 2
        return $this->before.$shortcode->getContent().$this->after;
36
    }
37
}
38