LfiProtectionTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 30
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setLfiProtection() 0 4 1
A isLfiProtectionOn() 0 4 1
1
<?php
2
3
namespace AssetManager\Core\Resolver;
4
5
trait LfiProtectionTrait
6
{
7
    /**
8
     * Flag indicating whether or not LFI protection for rendering view scripts is enabled
9
     *
10
     * @var bool
11
     */
12
    protected $lfiProtectionOn = true;
13
14
    /**
15
     * Set LFI protection flag
16
     *
17
     * @param  bool $flag
18
     * @return void
19
     */
20
    public function setLfiProtection($flag)
21
    {
22
        $this->lfiProtectionOn = (bool) $flag;
23
    }
24
25
    /**
26
     * Return status of LFI protection flag
27
     *
28
     * @return bool
29
     */
30
    public function isLfiProtectionOn()
31
    {
32
        return $this->lfiProtectionOn;
33
    }
34
}
35