Completed
Pull Request — master (#14)
by ARCANEDEV
02:58 queued 45s
created

Markdown   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDefaultDriver() 0 4 1
A parser() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Arcanedev\LaravelMarkdown;
6
7
use Arcanedev\LaravelMarkdown\Contracts\Markdown as MarkdownContract;
8
use Illuminate\Support\Manager;
9
10
/**
11
 * Class     Markdown
12
 *
13
 * @package  Arcanedev\LaravelMarkdown
14
 * @author   ARCANEDEV <[email protected]>
15
 *
16
 * @method  \Illuminate\Support\HtmlString  parse(string $text)
17
 * @method  void                            begin()
18
 * @method  \Illuminate\Support\HtmlString  end()
19
 *
20
 * @mixin  \Arcanedev\LaravelMarkdown\Parsers\AbstractParser
21
 */
22
class Markdown extends Manager implements MarkdownContract
23
{
24
    /* -----------------------------------------------------------------
25
     |  Main Methods
26
     | -----------------------------------------------------------------
27
     */
28
29
    /**
30
     * Get the default driver name.
31
     *
32
     * @return string
33
     */
34 14
    public function getDefaultDriver(): string
35
    {
36 14
        return $this->config->get('markdown.default');
37
    }
38
39
    /**
40
     * Get the parser instance.
41
     *
42
     * @param  string|null  $driver
43
     *
44
     * @return \Arcanedev\LaravelMarkdown\Contracts\Parser
45
     */
46 2
    public function parser($driver = null)
47
    {
48 2
        return $this->driver($driver);
49
    }
50
}
51