Completed
Pull Request — master (#86)
by Vladimir
31:16
created

getExpandedValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * @copyright 2018 Vladimir Jimenez
5
 * @license   https://github.com/stakx-io/stakx/blob/master/LICENSE.md MIT
6
 */
7
8
namespace allejo\stakx\Event;
9
10
use allejo\stakx\Document\RepeaterPageView;
11
use allejo\stakx\FrontMatter\ExpandedValue;
12
use Symfony\Component\EventDispatcher\Event;
13
14
/**
15
 * This event is fired before a Repeater PageView is rendered and allows you inject custom variables into the templates.
16
 *
17
 * @since 0.2.0
18
 */
19 View Code Duplication
class CompilerPreRenderRepeaterPageView extends Event
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
20
{
21
    use CompilerPreRenderTrait;
22
23
    const NAME = 'compiler.prerender.repeater_pageview';
24
25
    private $pageView;
26
    private $expandedValue;
27
28 3
    public function __construct(RepeaterPageView $pageView, ExpandedValue $expandedValue)
29
    {
30 3
        $this->pageView = $pageView;
31 3
        $this->expandedValue = $expandedValue;
32 3
    }
33
34
    public function getPageView()
35
    {
36
        return clone $this->pageView;
37
    }
38
39
    public function getExpandedValue()
40
    {
41
        return clone $this->expandedValue;
42
    }
43
}
44