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 ( 6c85d2...15e8d5 )
by Colin
04:57
created

HtmlInlineRenderer::setConfiguration()   A

Complexity

Conditions 1
Paths 1

Duplication

Lines 0
Ratio 0 %

Size

Total Lines 4
Code Lines 2

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of the league/commonmark package.
5
 *
6
 * (c) Colin O'Dell <[email protected]>
7
 *
8
 * Original code based on the CommonMark JS reference parser (http://bitly.com/commonmark-js)
9
 *  - (c) John MacFarlane
10
 *
11
 * For the full copyright and license information, please view the LICENSE
12
 * file that was distributed with this source code.
13
 */
14
15
namespace League\CommonMark\Inline\Renderer;
16
17
use League\CommonMark\ElementRendererInterface;
18
use League\CommonMark\Inline\Element\AbstractInline;
19
use League\CommonMark\Inline\Element\HtmlInline;
20
use League\CommonMark\Util\Configuration;
21
use League\CommonMark\Util\ConfigurationAwareInterface;
22
23
class HtmlInlineRenderer implements InlineRendererInterface, ConfigurationAwareInterface
24
{
25
    /**
26
     * @var Configuration
27
     */
28
    protected $config;
29
30
    /**
31
     * @param HtmlInline               $inline
32
     * @param ElementRendererInterface $htmlRenderer
33
     *
34
     * @return string
35
     */
36 75
    public function render(AbstractInline $inline, ElementRendererInterface $htmlRenderer)
37
    {
38 75
        if (!($inline instanceof HtmlInline)) {
39 3
            throw new \InvalidArgumentException('Incompatible inline type: ' . get_class($inline));
40
        }
41
42 72
        if ($this->config->getConfig('safe') === true) {
43
            return '';
44
        }
45
46 72
        return $inline->getContent();
47
    }
48
49
    /**
50
     * @param Configuration $configuration
51
     */
52 1878
    public function setConfiguration(Configuration $configuration)
53
    {
54 1878
        $this->config = $configuration;
55 1878
    }
56
}
57