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

EmailHandler   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
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 19
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 3
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 EmailHandler
10
{
11
    /**
12
     * [email="[email protected]"]Contact me![/email]
13
     * [email="[email protected]" /]
14
     * [email][email protected][/email]
15
     *
16
     * @param ShortcodeInterface $shortcode
17
     *
18
     * @return string
19
     */
20 3
    public function __invoke(ShortcodeInterface $shortcode)
21
    {
22 3
        $email = $shortcode->getBbCode() ?: $shortcode->getContent();
23 3
        $content = $shortcode->getContent() === null ? $email : $shortcode->getContent();
24
25 3
        return '<a href="mailto:'.$email.'">'.$content.'</a>';
26
    }
27
}
28