FrontMatterVariable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 10
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A source() 0 3 1
A parse() 0 3 1
1
<?php
2
/**
3
 * @link https://www.github.com/tinydots/craft-front-matter
4
 * @copyright Copyright (c) Mike Pepper
5
 * @license MIT
6
 */
7
namespace tinydots\frontmatter\variables;
8
9
use tinydots\frontmatter\FrontMatter;
10
11
/**
12
 * Class FrontMatterVariable
13
 *
14
 * @author Mike Pepper <[email protected]>
15
 * @since 1.0.0
16
 */
17
class FrontMatterVariable
18
{
19
    public function parse($template)
20
    {
21
        return FrontMatter::$plugin->frontMatter->parseTemplate($template)->getYAML();
22
    }
23
24
    public function source($template)
25
    {
26
        return FrontMatter::$plugin->frontMatter->parseTemplate($template)->getContent();
27
    }
28
}