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::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 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