QuoteTwigExtensionTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 27
rs 10
c 0
b 0
f 0
ccs 5
cts 5
cp 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getQuoteTwigExtension() 0 2 1
A setQuoteTwigExtension() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the core-bundle package.
5
 *
6
 * (c) 2019 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\CoreBundle\Twig\Extension;
13
14
/**
15
 * Quote Twig extension trait.
16
 *
17
 * @author webeweb <https://github.com/webeweb>
18
 * @package WBW\Bundle\CoreBundle\Twig\Extension
19
 */
20
trait QuoteTwigExtensionTrait {
21
22
    /**
23
     * Quote Twig extension.
24
     *
25
     * @var QuoteTwigExtension|null
26
     */
27
    private $stylesheetTwigExtension;
28
29
    /**
30
     * Get the quote Twig extension.
31
     *
32
     * @return QuoteTwigExtension|null Returns the quote Twig extension.
33
     */
34 20
    public function getQuoteTwigExtension(): ?QuoteTwigExtension {
35 20
        return $this->stylesheetTwigExtension;
36
    }
37
38
    /**
39
     * Set the quote Twig extension.
40
     *
41
     * @param QuoteTwigExtension|null $quoteTwigExtension The quote Twig extension.
42
     * @return self Returns this instance.
43
     */
44 10
    protected function setQuoteTwigExtension(?QuoteTwigExtension $quoteTwigExtension): self {
45 10
        $this->stylesheetTwigExtension = $quoteTwigExtension;
46 10
        return $this;
47
    }
48
}
49