Completed
Pull Request — master (#86)
by Vladimir
08:58
created

CompilerPreRenderTrait::getCustomVariables()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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
trait CompilerPreRenderTrait
11
{
12
    protected $customVariables = [];
13
14
    public function getCustomVariables()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
15
    {
16
        return $this->customVariables;
17
    }
18
19
    /**
20
     * Append custom variables that'll be made available as template variables in PageViews.
21
     *
22
     * @param array $customVariables
23
     *
24
     * @since 0.2.0
25
     */
26
    public function appendCustomVariables(array $customVariables)
27
    {
28
        $this->customVariables = array_merge($this->customVariables, $customVariables);
29
    }
30
}
31