Passed
Pull Request — 1.x (#117)
by Akihito
04:40 queued 02:22
created

DonutTemplate   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 4
c 2
b 0
f 0
dl 0
loc 16
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A disable() 0 3 1
A enable() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BEAR\QueryRepository;
6
7
final class DonutTemplate
8
{
9
    /** @readonly */
10
    public static $disable = false;
11
12
    /**
13
     * Set refresh donut flag for AbstractDonutCacheInterceptor
14
     */
15
    public function disable(): void
16
    {
17
        self::$disable = true;
18
    }
19
20
    public function enable(): void
21
    {
22
        self::$disable = false;
23
    }
24
}
25